Skip to content

Instantly share code, notes, and snippets.

@dimme
Created April 10, 2013 01:38
/* Arduino WebVisitors Blinker by Dimme.net */
int ledPin = 12;
int val = 0;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop () {
val = Serial.read();
if (val > '0' && val <= '9') {
val = val - '0';
for(int i=0; i<val; i++) {
digitalWrite(ledPin,HIGH);
delay(150);
digitalWrite(ledPin, LOW);
delay(150);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment