Skip to content

Instantly share code, notes, and snippets.

@joshnuss
Created March 3, 2012 08:42
Show Gist options
  • Save joshnuss/1965021 to your computer and use it in GitHub Desktop.
Save joshnuss/1965021 to your computer and use it in GitHub Desktop.
frequency blink
void blink(int frequency) {
int milliseconds = 1000/frequency;
digitalWrite(ledPin, HIGH);
delay(milliseconds);
digitalWrite(ledPin, LOW);
delay(milliseconds);
}
void loop() {
for (int i=4; i <= 8; i++) {
blink(i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment