Blame view
software/common_class/switches.py
569 Bytes
14b996da3
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
""" author Benoit Dubois copyright FEMTO Engineering, 2021 licence GPL v3+ brief Collector for aggregating pins used as switches in PID servo app. """ class Switches(object): """Collector for aggregating pins used as switches in PID servo app. """ def __init__(self, p1, i1, p2, i2): """Parameters are pin identifiers allowable by pyb.Pin class (e.g. pin object, CPU pin, string matching board pin...). """ self.p1 = pyb.Pin(p1) self.i1 = pyb.Pin(i1) self.p2 = pyb.Pin(p2) self.i2 = pyb.Pin(i2) |