Skip to content

Instantly share code, notes, and snippets.

@michalvalasek
Created March 19, 2012 18:08
Show Gist options
  • Save michalvalasek/2122156 to your computer and use it in GitHub Desktop.
Save michalvalasek/2122156 to your computer and use it in GitHub Desktop.
Arduino Lamer #1
const int LED = 9;
int i = 0;
void setup()
{
pinMode(LED, OUTPUT);
}
void loop()
{
for (i=0; i<255; i++) {
analogWrite(LED, i);
delay(20);
}
for (i=255; i>0; i--) {
analogWrite(LED, i);
delay(20);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment