Skip to content
Snippets Groups Projects
Commit 53966fd9 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

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

Add these methods to this "GPIO output emulated with console prints"
config.
parent c15be989
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment