Fix naming conflict
This commit is contained in:
parent
be6f3376ee
commit
6d359b4a6f
@ -7,16 +7,16 @@ io.setmode(io.BCM)
|
||||
class Pin:
|
||||
def __init__(self, num, off=io.HIGH):
|
||||
self.pin = num
|
||||
self.off = off
|
||||
self.off_mode = off
|
||||
|
||||
def setup(self):
|
||||
io.setup(self.pin, io.OUT)
|
||||
|
||||
def off(self):
|
||||
io.output(self.pin, self.off)
|
||||
io.output(self.pin, self.off_mode)
|
||||
|
||||
def on(self):
|
||||
io.output(self.pin, io.LOW if self.off == io.HIGH else io.HIGH)
|
||||
io.output(self.pin, io.LOW if self.off_mode == io.HIGH else io.HIGH)
|
||||
|
||||
pins = {
|
||||
"red": Pin(27),
|
||||
|
Loading…
Reference in New Issue
Block a user