PROYECTO 2 - CONSTRUCCIÓN DE SEMÁFORO PEATONAL A ESCALA

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024
  • La Srta. Ignacia Martínez, estudiante de la Especialidad de Electricidad, nos entrega un tutorial acerca de cómo implementar un semáforo peatonal a escala en base a Arduino y un módulo de relé de dos canales.
    PROGRAMACIÓN:
    void setup() {
    pinMode (9, OUTPUT); // LED ROJO
    pinMode (8, OUTPUT); // LED VERDE
    }
    void loop() {
    digitalWrite (9, LOW); // ENCIENDE LED ROJO
    digitalWrite (8, HIGH); // APAGA LED VERDE
    delay (10000);
    digitalWrite (9, HIGH); // APAGA LED ROJO
    digitalWrite (8, LOW ); // ENCIENDE LED VERDE
    delay (5000);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    digitalWrite (8, HIGH);
    delay (500);
    digitalWrite (8, LOW);
    delay (500);
    }

ความคิดเห็น •