Skip to content

Instantly share code, notes, and snippets.

@tomoyo-kousaka
tomoyo-kousaka / gist:1000361
Created May 31, 2011 11:39
tokeiEx(Arduino
int sensorPin = A0;
int val = 0;
int ledPin = 13;
int sensorValue = 0;
float times = 0;
int send;
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
@tomoyo-kousaka
tomoyo-kousaka / gist:1000360
Created May 31, 2011 11:39
tokeiEx(Arduino
int sensorPin = A0;
int val = 0;
int ledPin = 13;
int sensorValue = 0;
float times = 0;
int send;
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
@tomoyo-kousaka
tomoyo-kousaka / gist:1000359
Created May 31, 2011 11:39
tokeiEx(Processing
import processing.serial.*;
Serial myPort;
int i = 0; //counter for dummyClock
int j = 0; //counter for dummyTIme
int p_j = 0;
float r = 25;//chushinsen no hankei
int setm = 15; //target minute
int value = 0; //starting flag
float span = 0; //continued time
@tomoyo-kousaka
tomoyo-kousaka / gist:730394
Created December 6, 2010 14:52
シリアル通信モーター制御(Arduino)
int sig = 0;
int led = -1;
int spd=255; //1~255の値にする
void setup(){
Serial.begin(4800);
pinMode(2,OUTPUT);//左モーター用ドライバピン
pinMode(4,OUTPUT);//左モーター用ドライバピン
pinMode(7,OUTPUT); //右モーター用ドライバピン
pinMode(8,OUTPUT); //右モーター用ドライバピン