Diagnostics & Debugging Guide

Serial Console Output

The firmware emits status information at 115200 baud during boot and sensor read cycles:

Kitchen Analyzer starting...
DHT sensor initialized
MQ2 sensor initialized
I2C initialized with custom pins
Wake up configured on motion sensor pin and timer
LCD initialized
Setup complete
Motion sensor: HIGH
Gas: 120.45, Temp: 23.60, Hum: 45.20
LCD updated with sensor values

Troubleshooting Matrix

IssuePotential CauseVerification / Solution
“Sensor Error” on LCDDHT22 disconnected or pull-up missingCheck wiring on GPIO 13, verify 3.3V supply and 10k pullup resistor if module lacks one.
LCD displays blank rectanglesIncorrect I2C address or contrast settingAdjust potentiometer on PCF8574 backpack. Confirm address is 0x27.
Device never sleepsPIR sensitivity set too high or noise on GPIO 34Adjust potentiometer on PIR sensor module. Verify threshold in code (> 1000).
Device wakes immediately after sleepPIR output bouncing or re-trigger jumper set improperlySet PIR jumper to non-repeatable trigger (L mode) or adjust delay pot.