Instructions
APPENDIX A. API DOCUMENTATION
For the serious programmers – here is the technical documentation. The file
monkmakes_aq.py is not installed as a full Python library, but should just be copied
into the same folder as any other code that needs to use it.
aq.py
The monkmakes_aq.py module is a class that wraps the serial communication
between your Raspberry Pi and the Air Quality board.
Creating an instance of AQ:
aq = AQ()
Reading the eCO2 reading
aq.get_eco2() # returns the eCO2 reading in ppm
Reading the temperature in degrees C
aq.get_temp() # returns the temperature in degrees C
The LED display
aq.leds_manual() # set LED mode to manual
aq.leds_automatic() # set LED mode to automatic
# so that LEDs display eCO2
aq.set_led_level(level) # level 0-LEDs off,
# level 1-6 LED 1 to 6 lit
Buzzer
aq.buzzer_on()
aq_buzzer_off()
The class communicates with the sensor board using the Pi's serial interface. If you
want to see details of the serial interface, then please take a look at the datasheet
for this product. You will find a link to this from the product's web page
(http://monkmakes.com/pi_aq)
Page 20