pyupm_mq303a module

class pyupm_mq303a.MQ303A(pin, heaterPin)[source]

Bases: object

API for the MQ303A Alcohol Sensor.

ID: mq303a

Name: Alcohol Detection Sensor

Other Names: Grove Alcohol Sensor

Category: gaseous

Manufacturer: seeed

Link:http://www.seeedstudio.com/wiki/Grove_-_Alcohol_Sensor

Connection: analog gpio

Kit: tsk UPM module for the MQ303A alcohol sensor. This sensor needs to be warmed up before stable results are obtained. The higher the value returned from value(), the higher the amount of alcohol detected.

C++ includes: mq303a.hpp

heaterEnable(enable)[source]

void heaterEnable(bool enable)

Enables the heater

enable: Enables the heater if true; otherwise, disables it

value()[source]

int value()

Gets the alcohol reading from the sensor. The value read from the analog pin is inverted. A higher returned value means a higher amount of alcohol detected.

Alcohol reading