Auto Shut-off safety system for stove
Dependencies: mbed Motordriver DHT
main.cpp
- Committer:
- Niranjan_ravi
- Date:
- 2019-02-26
- Revision:
- 0:c8b31227d874
- Child:
- 1:b63b3fcf72d1
File content as of revision 0:c8b31227d874:
#include "mbed.h" Serial pc(USBTX, USBRX); // tx, rx DigitalOut led(LED1); DigitalIn pir(D2); //Connect it to Timer timer; int main() { while(1) { if(!pir){ led = 0; pc.printf("Nothing Detected\r\n"); wait(1); } else { led=1; pc.printf("Motion Detected\r\n"); wait(1); } } }