arduino-course/Week 1/Blink/Blink.ino

25 lines
415 B
Arduino
Raw Permalink Normal View History

2019-11-08 18:14:40 +01:00
// Blink
void setup() {
pinMode(7, OUTPUT);
pinMode(5, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
int pin1 = 7;
int pin2 = 5;
int pin3 = 3;
int time = 100;
digitalWrite(pin1, HIGH);
delay(time);
digitalWrite(pin1, LOW);
delay(time);
digitalWrite(pin2, HIGH);
delay(time);
digitalWrite(pin2, LOW);
delay(time);
digitalWrite(pin3, HIGH);
delay(time);
digitalWrite(pin3, LOW);
}