platypush/platypush/backend/sensor/mcp3008.py

20 lines
541 B
Python
Raw Normal View History

from platypush.backend.sensor import SensorBackend
2018-04-29 23:51:53 +02:00
class SensorMcp3008Backend(SensorBackend):
2018-06-26 00:36:01 +02:00
"""
Backend to poll analog sensor values from an MCP3008 chipset
(https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008)
Requires:
* ``adafruit-mcp3008`` (``pip install adafruit-mcp3008``)
* The :mod:`platypush.plugins.gpio.sensor.mcp3008` plugin configured
"""
def __init__(self, **kwargs):
super().__init__(plugin='gpio.sensor.mcp3008', **kwargs)
2018-04-29 23:51:53 +02:00
# vim:sw=4:ts=4:et: