Closed dzvid closed 4 years ago
After analyzing a lookup table, concluded that VPIN can return 0 Volts when:
The voltage drop in RL is 0V, that means that the voltage drop in Rs (VRS) is equal to VCC (5V) what is unlikely to happen in practice according to the lookup table.
There is a bad wiring connection in the breadboard.
Fixed in https://github.com/tukno/sensor-node-aqs/pull/6/commits/93ee9a6f44c1296b5e4b7933010c16fab7ce4121 In case VPIN is 0V, raise an MQSensorException.
When the voltage in RL is equals to 0, the sensor throws a division by zero error.