Browse Source

examples: hwconfig_console: Add .on()/.off() methods.

Add these methods to this "GPIO output emulated with console prints"
config.
pull/3349/merge
Paul Sokolovsky 7 years ago
parent
commit
53966fd9a8
  1. 6
      examples/hwapi/hwconfig_console.py

6
examples/hwapi/hwconfig_console.py

@ -8,6 +8,12 @@ class LEDClass:
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)

Loading…
Cancel
Save