View OHC-PC01A.py
#coding: utf-8 | |
# サンイン重工 OHC-PC01AコントローラからPythonへ繋ぎこむライブラリ | |
import pygame | |
import time | |
class OHC_PC01A: | |
def __init__(self): | |
pygame.init() |
View dsair2_analog_test.py
#coding:utf-8 | |
import serial | |
import time | |
def send(s, value): | |
s.write(value.encode('ascii') + b'\n') | |
s.flush() | |
def init_dsair2(s): |
View dmarc.xml
<feedback> | |
<report_metadata> | |
<org_name>受信者名</org_name> | |
<date_range> | |
<begin>開始UNIX TIME</begin> | |
<end>終了UNIX TIME</end> | |
</date_range> | |
</report_metadata> | |
<record> | |
<!-- recordは1つのXMLに複数含まれうる --> |
View retribe_xmls.js
function retribeXMLs() | |
{ | |
var xmls = []; | |
var messages; | |
var zipblob; | |
var fileblob; | |
// 2日以内のすべてのスレッドを取得 | |
var threads = GmailApp.search('newer_than:2d'); | |
View sekkin.py
#coding:utf-8 | |
import serial | |
import time | |
import pygame | |
# シリアルポートのデバイスファイル名に差し替える | |
port = '/dev/sekkin' | |
pygame.mixer.init(44100, -16, 1, 256) |
View dep_bell.py
#coding:utf-8 | |
# Requirements: Python3, PySerial, Pygame | |
# 同じディレクトリに bell.wav と announce.wav を用意する | |
# 「どこでも発車ベル」と同じボタンをつなぐ | |
# シリアルポートを設定する | |
import serial | |
import time | |
import pygame |
View FREQROL.py
#! /usr/bin/env python3 | |
#coding:utf-8 | |
import serial | |
import time | |
class FREQROL: | |
def __init__(self): | |
self.ser = serial.Serial( | |
port='/dev/ttyUSB0', # ここをRS485デバイスに書き換える。COM0など |
View break_reader.c
#include "mcc_generated_files/mcc.h" | |
void main(void) | |
{ | |
// initialize the device | |
SYSTEM_Initialize(); | |
// Enable the Global Interrupts | |
INTERRUPT_GlobalInterruptEnable(); |
View osc.c
#include "mcc_generated_files/mcc.h" | |
void setNextLevel(void); | |
unsigned char curve1[] = { | |
39, 40, 26, 56, 39, 14, 58, 34, 46, 47, 39, 44, 37, 34, 37, 32, 28, | |
39, 38, 39, 47, 45, 42, 45, 40, 37, 37, 29, 39, 39, 32, 45, 45, 37, | |
39, 37, 37, 36, 34, 38, 39, 43, 46, 42, 42, 41, 38, 37, 40, 36, 34, | |
37, 37, 37, 41, | |
}; |
View mascon_read.py
#coding:utf-8 | |
import serial | |
device = '/dev/ttyUSB0' | |
ser = serial.Serial(device, baudrate=9600) | |
mascon_level = -1 # init | |
static_mascon_level = -1 # init | |
buttons = -1; |
NewerOlder