mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
libraries: Add machine.LED.value function.
This commit is contained in:
parent
15ae4bc2bb
commit
0ab0ea420d
@ -35,3 +35,6 @@ class LED:
|
||||
|
||||
def toggle(self):
|
||||
self.pin(not self.pin())
|
||||
|
||||
def value(self, v=None):
|
||||
self.pin(v ^ self.inverted if v is not None else None)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user