2018-06-12 00:36:43 +02:00
|
|
|
from platypush.backend.sensor import SensorBackend
|
2018-04-29 23:51:53 +02:00
|
|
|
|
|
|
|
|
2018-06-12 00:36:43 +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
|
|
|
|
"""
|
|
|
|
|
2019-08-14 19:49:19 +02:00
|
|
|
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:
|