From aedad94aaf2350e92b39472d3132118e8a77152e Mon Sep 17 00:00:00 2001 From: willem Date: Mon, 24 Oct 2022 17:35:24 +0200 Subject: [PATCH] modified py --- main.py | 3 +-- raspberrypihal.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4d337fa..bd1951a 100755 --- a/main.py +++ b/main.py @@ -44,10 +44,9 @@ else: try: # If the rpi_ws281x Python module is available, then use that... from raspberrypihal import RaspberryPiHAL as HAL - except : + except exception as e: # ...else assume that there's an MCU (driving the display) connected # to a serial port - e = sys.exc_info()[0] print('HAL: failed: {}'.format(e.args[0])) from arduinoserialhal import ArduinoSerialHAL as HAL diff --git a/raspberrypihal.py b/raspberrypihal.py index 410ac48..ed5928c 100644 --- a/raspberrypihal.py +++ b/raspberrypihal.py @@ -15,7 +15,7 @@ # from rpi_ws281x import PixelStrip, Color from gpiozero import Button -import utime +import os # LED strip configuration: LED_PIN = 18 # GPIO pin connected to the pixels (18 uses PWM!).