Policijska sirena i oznaka Starta
Strojarska i prometna škola VaraždinVideo snimka
Izrada projekta
Ako se pritisne drugo tipkalo(unutarnje) crvena i zelena led dioda počinju svijetliti u obliku starta na trkaćim stazama.
Mobilna aplikacija
Shema projekta
Spojene su tri diode i dva tipkala i dva senzora za zvuk na Arduino mikrokontroler i eksperimentalnu pločicu.
Shemu ovoga projekta možete preuzeti ovdje.
Arduino program
#define BLYNK_PRINT /* int crvena = 2; int plava = 3; int zelena = 4; int tipkaloCP = 8; int tipkaloC = 9; void setup() { pinMode(crvena, OUTPUT); pinMode(plava, OUTPUT); pinMode(zelena, OUTPUT); pinMode(tipkaloCP, INPUT_PULLUP); pinMode(tipkaloC, INPUT_PULLUP); digitalWrite(crvena, LOW); digitalWrite(plava, LOW); digitalWrite(zelena, LOW); } void loop() { if (digitalRead(tipkaloCP)==LOW){ digitalWrite(crvena,HIGH); delay(500); digitalWrite(crvena,LOW); delay(500); digitalWrite(crvena,HIGH); delay(500); digitalWrite(crvena,LOW); delay(500); digitalWrite(crvena,HIGH); delay(500); digitalWrite(crvena,LOW); delay(500); digitalWrite(zelena,HIGH); delay(1000); digitalWrite(zelena,LOW); } if (digitalRead(tipkaloC)==LOW){ digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); } }
Arduino program ovoga projekta možete preuzeti ovdje.
#define BLYNK_PRINT /* #include #include #include // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "f300391f0e6c46e096df5b7866888594"; // Your WiFi credentials. // Set password to "" for open networks. char ssid[] ="guest"; char pass[] = "sips2017"; void setup() { // Debug console SerialUSB.begin(9600); Blynk.begin(auth, ssid, pass); // You can also specify server: //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442); //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442); } void loop() { Blynk.run(); // You can inject your own code or combine it with other sketches. // Check other examples on how to communicate with Blynk. Remember // to avoid delay() function! } int crvena = 2; int plava = 3; int zelena = 4; int tipkaloCP = 8; int tipkaloC = 9; void setup() { pinMode(crvena, OUTPUT); pinMode(plava, OUTPUT); pinMode(zelena, OUTPUT); pinMode(tipkaloCP, INPUT_PULLUP); pinMode(tipkaloC, INPUT_PULLUP); digitalWrite(crvena, LOW); digitalWrite(plava, LOW); digitalWrite(zelena, LOW); } void loop() { if (digitalRead(tipkaloCP)==LOW){ digitalWrite(crvena,HIGH); delay(500); digitalWrite(crvena,LOW); delay(500); digitalWrite(crvena,HIGH); delay(500); digitalWrite(crvena,LOW); delay(500); digitalWrite(crvena,HIGH); delay(500); digitalWrite(crvena,LOW); delay(500); digitalWrite(zelena,HIGH); delay(1000); digitalWrite(zelena,LOW); } if (digitalRead(tipkaloC)==LOW){ digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); digitalWrite(crvena,HIGH); delay(100); digitalWrite(crvena,LOW); delay(100); digitalWrite(plava,HIGH); delay(100); digitalWrite(plava,LOW); delay(100); } }
Arduino program ovoga projekta možete preuzeti ovdje.
Autori
Projekt su izradili Dino Mikulić i Karlo Vugrinčić uz mentorstvo Marine Lepoglavec iz Strojarske i prometne škole Varaždin.
Projekt je prijavljen na temu: Internet of Things: Pametna rasvjeta.