SerialSensor

class compas_fab.sensors.SerialSensor(serial)[source]

Bases: object

Base class for all sensors with a serial interface.

Parameters

serial (serial.Serial) – Instance of the serial port used to communicate with the sensor.

Examples

>>> from serial import Serial                           
>>> with Serial('COM5', 57600, timeout=1) as serial:    
...     sensor = SerialSensor(serial)                   

Methods

__init__(serial)

Initialize self.