- class platypush.plugins.serial.SerialPlugin(device=None, baud_rate=9600, **kwargs)
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)
- get_measurement(device=None, baud_rate=None)
Reads JSON data from the serial device and returns it as a message
- read(device=None, baud_rate=None, size=None, end=None)
Reads raw data from the serial device
- write(data, device=None, baud_rate=None)
Writes data to the serial device.