Ideja projekta: Kada korisnik otvori ulazna vrata kuće/stana/zgrade da se pali svjetlo u stubištu ili ulaznom prostoru. Sve dok su ulazna vrata otvorena, svjetlo će biti upaljeno (limit switch se nalazi negdje u štoku vrata). Ukoliko vrijeme istekne, a korisnik želi još svjetlosti, moguće je pritisnuti gumb (tipkalo) te će se svjetlo upaliti na određen period. U ovom projektu je to period od 3 min (180s).

Dependencies:   mbed

https://os.mbed.com/media/uploads/achixx/wiring.pdf

Files at this revision

API Documentation at this revision

Comitter:
achixx
Date:
Thu Apr 08 15:21:50 2021 +0000
Parent:
1:0147b1abbca5
Commit message:
Interior V2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 0147b1abbca5 -r 6cf9d41a5c08 main.cpp
--- a/main.cpp	Thu Apr 08 15:15:08 2021 +0000
+++ b/main.cpp	Thu Apr 08 15:21:50 2021 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "CHECK.h"
 Serial pc(USBTX, USBRX, 9600);
-InterruptIn button(PB_5); // Interrupt on digital pushbutton input pb5 - Tun ON lights
+InterruptIn button(PB_5); // Interrupt on digital pushbutton input - Tun ON lights
 DigitalIn limSw(PB_4); // Limit switch on the door
 DigitalOut svjetlo(PA_10); // LED strip ON
 Check svjetlo2(PB_3); // LED indication for working program