- class platypush.plugins.serial.SerialPlugin(device=None, baud_rate=9600, **kwargs)[source]
The serial plugin can read data from a serial device, as long as the serial device returns a JSON. You can use this plugin to interact for example with some sensors connected through an Arduino. Just make sure that the code on your serial device returns JSON values. If you’re using an Arduino or any ATMega compatible device, take a look at https://github.com/bblanchon/ArduinoJson.
- __init__(device=None, baud_rate=9600, **kwargs)[source]
- get_measurement(device=None, baud_rate=None)[source]
Reads JSON data from the serial device and returns it as a message
- read(device=None, baud_rate=None, size=None, end=None)[source]
Reads raw data from the serial device
- write(data, device=None, baud_rate=None)[source]
Writes data to the serial device.