-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ficha1_Code2.ino
40 lines (31 loc) · 953 Bytes
/
Ficha1_Code2.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const int ROJO = 11;
const int AMBAR = 10;
const int VERDE = 9;
const int BLANCO = 6;
void setup()
{
pinMode(ROJO, OUTPUT); // pinMode es una función que define un pin como entrada o salida. Ponemos
pinMode(AMBAR, OUTPUT); // pinMode( [el pin sobre el que queremos actuar], INPUT (entrada) / OUTPUT (salida)
pinMode(VERDE, OUTPUT);
pinMode(BLANCO, OUTPUT);
}
void loop()
{
int Tiempo = 250;
digitalWrite(ROJO, HIGH);
delay(Tiempo);
digitalWrite(AMBAR, HIGH);
delay(Tiempo);
digitalWrite(VERDE, HIGH);
delay(Tiempo);
digitalWrite(BLANCO, HIGH);
delay(Tiempo);
digitalWrite(BLANCO, LOW);
delay(Tiempo);
digitalWrite(VERDE, LOW);
delay(Tiempo);
digitalWrite(AMBAR, LOW);
delay(Tiempo);
digitalWrite(ROJO, LOW);
delay(Tiempo);
}