Created
January 9, 2020 08:10
-
-
Save knowblesse/056b1d82b50488c9d8c5541d1b5c43d7 to your computer and use it in GitHub Desktop.
LearningArduino.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
// code below only runs once | |
pinMode(6,OUTPUT); // setting up the digital pin 6. You don't need to call this func twice. | |
digitalWrite(6,HIGH); // supply 5V to the digital pin 6 | |
delay(1000); // freeze for 1000ms | |
digitalWrite(6,LOW); // supply 0V to the digital pin 6 | |
} | |
void loop() { | |
// code below runs repeatedly | |
} | |
/* How to upload : | |
* 1. Go to Tool > Board and check whether the board is configured correctly. (Arduino/Genuino Uno) | |
* 2. Go to Tool > Port and select proper port number. | |
* 3. GO to Sketch > Upload or press the right arrow button at the top of IDE | |
*/ | |
// objective : turn on the red leds sequentially with 1sec interval, | |
// and turn on any led in the bottom 1 sec with the last red led. | |
// And then turn of all leds, wait for some seconds, and do the first process again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment