Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the setup function runs once when you press reset or power the board
- void setup() {
- // initialize digital pin LED_BUILTIN as an output.
- pinMode(LED_BUILTIN, OUTPUT);
- pinMode(2, OUTPUT);
- pinMode(3, OUTPUT);
- pinMode(5, OUTPUT);
- pinMode(6, OUTPUT);
- pinMode(A0, OUTPUT);
- pinMode(A1, OUTPUT);
- pinMode(A2, OUTPUT);
- pinMode(A3, OUTPUT);
- digitalWrite(A1, OUTPUT);
- }
- // the loop function runs over and over again forever
- void loop() {
- digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
- delay(100); // wait for a second
- digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(3, LOW); // turn the LED off by making the voltage LOW
- delay(100); // wait for a second
- digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(5, LOW); // turn the LED off by making the voltage LOW
- delay(100); // wait for a second
- digitalWrite(A0, LOW); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(A0, HIGH); // turn the LED off by making the voltage LOW
- delay(100);
- digitalWrite(A1, LOW); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(A1, HIGH); // turn the LED off by making the voltage LOW
- delay(100);
- digitalWrite(A2, LOW); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(A2, HIGH); // turn the LED off by making the voltage LOW
- delay(100);
- digitalWrite(A3, LOW); // turn the LED on (HIGH is the voltage level)
- delay(100); // wait for a second
- digitalWrite(A3, HIGH); // turn the LED off by making the voltage LOW
- delay(100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement