Friday, January 20, 2012

Pinwheel encoder test

The arduino code I used for testing:
int trigs = 0;
void setup()
{
pinMode(13, OUTPUT);
attachInterrupt(0, ledblink, CHANGE);
Serial.begin(9600);
}

void loop()
{
delay(100);
}

void ledblink()
{
trigs++;
digitalWrite(13, HIGH);
delay(200);
digitalWrite(13, LOW);
Serial.println(trigs);
}
....and a quick video:

No comments:

Post a Comment