ESP8266-01
Reed switch magnetic door sensors
ESP8266-01
ATMEGA328P-PU
2 x LED
PIR sensor
TMP36 temperature sensor
Both the ESP8266-01 and AVR chip are powered from the same 9v battery. I am going to start looking at optimizing the ESP8266 chips first which are flashed with Arduino code using Arduino IDE.Could some let me know if 9V are the best to power these types of devices or if there is a more preferable battery to use and what the best steps are to optimize my codes, I have read some about sleep modes and I am thinking interrupts to wake the devices up when MQTT command is received or serial data received from the ATMEGA but this is a new area for me and too sure what would be best. TIA.