2016-11-17 23:20:26 -05:00
|
|
|
# This is hwconfig for "emulation" for cases when there's no real hardware.
|
|
|
|
# It just prints information to console.
|
|
|
|
class LEDClass:
|
|
|
|
|
|
|
|
def __init__(self, id):
|
2016-12-23 09:24:24 -05:00
|
|
|
self.id = "LED(%d):" % id
|
2016-11-17 23:20:26 -05:00
|
|
|
|
|
|
|
def value(self, v):
|
2016-12-23 09:24:24 -05:00
|
|
|
print(self.id, v)
|
2016-11-17 23:20:26 -05:00
|
|
|
|
2017-10-08 17:22:30 -04:00
|
|
|
def on(self):
|
|
|
|
self.value(1)
|
|
|
|
|
|
|
|
def off(self):
|
|
|
|
self.value(0)
|
|
|
|
|
2016-11-17 23:20:26 -05:00
|
|
|
|
|
|
|
LED = LEDClass(1)
|
|
|
|
LED2 = LEDClass(12)
|