You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
369 B
18 lines
369 B
# 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):
|
|
self.id = "LED(%d):" % id
|
|
|
|
def value(self, v):
|
|
print(self.id, v)
|
|
|
|
def on(self):
|
|
self.value(1)
|
|
|
|
def off(self):
|
|
self.value(0)
|
|
|
|
|
|
LED = LEDClass(1)
|
|
LED2 = LEDClass(12)
|
|
|