forked from USF-IEEE-Workshops/Arduino-Sample-Activity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub_workshop.ino
More file actions
22 lines (20 loc) · 852 Bytes
/
Copy pathgithub_workshop.ino
File metadata and controls
22 lines (20 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#define LED1 2
#define LED2 3
void setup() {
// put your setup code here, to run once:
pinMode(LED1,OUTPUT);//set pin 2 as an output
digitalWrite(LED1,LOW);//set pin 2 to the "low" or "off" state
pinMode(LED2,OUTPUT);//set pin 3 as an output
digitalWrite(LED2,LOW);//set pin 2 to the "low" or "off" state
}
void loop() {
// put your main code here, to run repeatedly:
delay(100);//delay measured in miliseconds
digitalWrite(LED1,HIGH);//set pin 2 to the "high" or "on" state
delay(1000);//delay measured in miliseconds
digitalWrite(LED1,LOW);//set pin 2 to the "low" or "off" state
delay(100);//delay measured in miliseconds
digitalWrite(LED2,HIGH);//set pin 3 to the "high" or "on" state
delay(2000);//delay measured in miliseconds
digitalWrite(LED2,LOW);//set pin 3 to the "low" or "off" state
}