I have built an electronic circuit that measures gases (natural gas, carbon monoxide, etc), just like the temperature and the humidity. This circuit shows the data on an “OLED 128x64 I2C” and sends it via Wifi for a mobile app and an SMS when the values get high. It has an alarm system as well, that consists of a buzzer and a led blinking.
Turns out that I have many thinks turned on in a (7.4v / 2.2A) battery, and I would like to know if my wiring is fine or if it is something that I may change.
I’m asking because sometimes, very rarely, I experience some crashes on the microcontroller, it may be a memory leak, so I’m letting the programme here too. But as I mentioned, with so many think turned on, it may be some kind of overload, I don’t understand electronic that much, to be honest, just a beginner, have to study more.
Thanks in advance.
Photo of the circuit: circuit.jpg (on the attachments)
Print of the schematics: schematics.png (on the attachments)
The code: (.ino) 382 lines (on the attachments)
vc_atmega328p-pu.ino (10.6 KB)