0% found this document useful (0 votes)
69 views2 pages

Semaforo de 2 Secuencias Blynk

This document describes an Arduino code for a two-sequence traffic light. The code uses Blynk libraries to control LED widgets through a mobile app. It defines pin assignments and uses timers to toggle the LEDs on and off in sequences of red, yellow, green or red based on input from the app. A diagram shows the traffic light circuit connected to an Arduino board.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views2 pages

Semaforo de 2 Secuencias Blynk

This document describes an Arduino code for a two-sequence traffic light. The code uses Blynk libraries to control LED widgets through a mobile app. It defines pin assignments and uses timers to toggle the LEDs on and off in sequences of red, yellow, green or red based on input from the app. A diagram shows the traffic light circuit connected to an Arduino board.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1

PROYECTO N°1 SEMAFORO DE 2


SECUENCIAS
Carlos David Rojas Lozano-20171005129

 delay(3000);
}
LED_A.on();
I. CÓDIGO ARDUINO digitalWrite(D6,1);
delay(3000);
#define BLYNK_PRINT Serial LED_A.on();
if(pinValue==1){
delay(1000);
#include <ESP8266WiFi.h> }
#include <BlynkSimpleEsp8266.h> LED_R.off();
digitalWrite(D7,0);
// You should get Auth Token in the Blynk App. LED_A.off();
// Go to the Project Settings (nut icon). digitalWrite(D6,0);
char auth[] = "9CE82EljPPV9NY3pLUWlb8WSp3g8q3vD"; LED_V.on();
digitalWrite(D5,1);
// Your WiFi credentials. delay(8000);
// Set password to "" for open networks. LED_V.on();
char ssid[] = "FAMILIA LOZANO"; if(pinValue==1){
char pass[] = "Fam1l1al969387"; delay(4000);
int timerID; }
int pinValue; LED_V.off();
#define D7 13 digitalWrite(D5,0);
#define D6 12 LED_A.on();
#define D5 14 digitalWrite(D6,1);
delay(3000);
WidgetLED LED_R(V0); LED_A.on();
WidgetLED LED_A(V2); if(pinValue==1){
WidgetLED LED_V(V3); delay(1000);
BlynkTimer timer; }
BLYNK_WRITE(V1){ LED_A.off();
pinValue=param.asInt(); digitalWrite(D6,0);
timer.deleteTimer(timerID);
timerID=timer.setInterval(10, conmutarLedWidgetR); }
if(pinValue==1){
Serial.println("secuencia2");
}else{
Serial.println("secuencia1"); void setup()
} {
} // Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass,"iot.laserud.co", 8080);
pinMode(D7,OUTPUT);
pinMode(D6,OUTPUT);
void conmutarLedWidgetR(){ pinMode(D5,OUTPUT);
timerID=timer.setInterval(10, conmutarLedWidgetR);
}
LED_R.on();
digitalWrite(D7,1); void loop()
delay(5000); {
LED_R.on(); Blynk.run();
if(pinValue==1){ timer.run();
2

}
II. CÓDIGO QR

III. DIAGRAMA CIRCUITAL

Fig2. Diagrama circuital

Link del video: https://youtu.be/5K47ufNZ44M

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy