Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- */
- Blink_2
- Turns one LED on for one second and the other for one second too,
- one in each time.
- This example code is in the public domain.
- */
- void setup() {
- // initialize the digital pin as an output.
- // Pin 13 has an LED connected on most Arduino boards:
- pinMode(13, OUTPUT);
- // initialize the digital pin 12 as an output.
- pinMode(12, OUTPUT);
- }
- void loop() {
- digitalWrite(13, HIGH); // set the LED at pin 13 on
- digitalWrite(12, LOW); // set the LED at pin 12 off
- delay(1000); // wait for a second
- digitalWrite(13, LOW); // set the LED at pin 13 off
- digitalWrite(12, HIGH); // set the LED at pin 13 on
- delay(1000); // wait for a second
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement