modified py
This commit is contained in:
3
main.py
3
main.py
@@ -44,10 +44,9 @@ else:
|
|||||||
try:
|
try:
|
||||||
# If the rpi_ws281x Python module is available, then use that...
|
# If the rpi_ws281x Python module is available, then use that...
|
||||||
from raspberrypihal import RaspberryPiHAL as HAL
|
from raspberrypihal import RaspberryPiHAL as HAL
|
||||||
except :
|
except exception as e:
|
||||||
# ...else assume that there's an MCU (driving the display) connected
|
# ...else assume that there's an MCU (driving the display) connected
|
||||||
# to a serial port
|
# to a serial port
|
||||||
e = sys.exc_info()[0]
|
|
||||||
print('HAL: failed: {}'.format(e.args[0]))
|
print('HAL: failed: {}'.format(e.args[0]))
|
||||||
from arduinoserialhal import ArduinoSerialHAL as HAL
|
from arduinoserialhal import ArduinoSerialHAL as HAL
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
from rpi_ws281x import PixelStrip, Color
|
from rpi_ws281x import PixelStrip, Color
|
||||||
from gpiozero import Button
|
from gpiozero import Button
|
||||||
import utime
|
import os
|
||||||
|
|
||||||
# LED strip configuration:
|
# LED strip configuration:
|
||||||
LED_PIN = 18 # GPIO pin connected to the pixels (18 uses PWM!).
|
LED_PIN = 18 # GPIO pin connected to the pixels (18 uses PWM!).
|
||||||
|
|||||||
Reference in New Issue
Block a user