Update main.py
parent
ae2598895e
commit
395584ef70
7
main.py
7
main.py
|
@ -14,6 +14,8 @@ LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest
|
|||
LED_INVERT = False # True to invert the signal (when using NPN transistor level shift)
|
||||
LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53
|
||||
|
||||
GPIO.cleanup()
|
||||
|
||||
led_power = True
|
||||
|
||||
try:
|
||||
|
@ -100,7 +102,7 @@ if __name__ == '__main__':
|
|||
GPIO.add_event_detect(13, GPIO.BOTH, callback=led_power_toggle, bouncetime=300)
|
||||
GPIO.add_event_detect(19, GPIO.BOTH, callback=change_idle_mode, bouncetime=300)
|
||||
GPIO.add_event_detect(13, GPIO.BOTH, callback=test, bouncetime=300)
|
||||
GPIO.add_event_detect(19, GPIO.BOTH, callback=test, bouncetime=300)
|
||||
GPIO.add_event_detect(19, GPIO.BOTH, callback=test, bouncetime=300)
|
||||
|
||||
try:
|
||||
while True:
|
||||
|
@ -134,4 +136,5 @@ if __name__ == '__main__':
|
|||
blink(strip, Color(255,0,0), Color(0,0,0))
|
||||
|
||||
except KeyboardInterrupt:
|
||||
setColor(strip, Color(0,0,0))
|
||||
setColor(strip, Color(0,0,0))
|
||||
GPIO.cleanup()
|
Loading…
Reference in New Issue