Skip to content

Instantly share code, notes, and snippets.

@kaithar
Forked from Toastdude/BlinkyLights
Created November 4, 2011 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaithar/6126cdf63932df6aab2f to your computer and use it in GitHub Desktop.
Save kaithar/6126cdf63932df6aab2f to your computer and use it in GitHub Desktop.
void setup() {
pinMode(2, OUTPUT);
pinMode(8, OUTPUT);
}
void loop() {
float f;
{for (f=0; f < endValue; f=f+0.1);
}
digitalWrite(2, HIGH);
delay(f);
digitalWrite(2, LOW);
digitalWrite(8, HIGH);
delay(f);
digitalWrite(8, LOW);
}
@kaithar
Copy link
Author

kaithar commented Nov 4, 2011

void setup() {
    pinMode(2, OUTPUT);
    pinMode(8, OUTPUT);
}

void loop() {
  float f;
  for (f=0; f < 1000; f=f+0.1)
  {
    digitalWrite(2, HIGH);
    delay(f);
    digitalWrite(2, LOW);
    digitalWrite(8, HIGH);
    delay(f);
    digitalWrite(8, LOW);   
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment