Skip to content

Instantly share code, notes, and snippets.

@johnaboxall
Created August 1, 2019 13:01
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 johnaboxall/fdc697c86d8a839a4555d281d835e947 to your computer and use it in GitHub Desktop.
Save johnaboxall/fdc697c86d8a839a4555d281d835e947 to your computer and use it in GitHub Desktop.
Example 1-1
int i = 1000;
void setup()
{
pinMode(3, OUTPUT); // sets digital pin 3 to an output
pinMode(6, OUTPUT); // sets digital pin 6 to an output
}
void loop()
{
digitalWrite(3, HIGH); // turns on digital pin 3
digitalWrite(6, LOW); // turns off digital pin 6
delay(i); // wait one second
digitalWrite(3, LOW); // turns off digital pin 3
digitalWrite(6, HIGH); // turns on digital pin 6
delay(i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment