Skip to content

Instantly share code, notes, and snippets.

@dimme
Created April 10, 2013 01:38
Show Gist options
  • Select an option

  • Save dimme/5351048 to your computer and use it in GitHub Desktop.

Select an option

Save dimme/5351048 to your computer and use it in GitHub Desktop.
/* 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