fourstix / Sparkfun_CircuitPython_SerLCD

CircuitPython driver for the Sparkfun SerLCD displays
MIT License
6 stars 4 forks source link

Won't work on microcontrollers since requires 'abc'? #4

Closed gallaugher closed 3 years ago

gallaugher commented 3 years ago

Am trying to get the larger SparkFun 16x2 SerLCD Qwiic display https://www.sparkfun.com/products/16396 to work with CIrcuitPython running on an Arduino Nano RP2040 Connect (other displays, such as the Adafruit STEMMA QT 0.91 work fine with this current setup & using their libraries). I'm too green to be able to get the library in this repo to work at first pass. I've added the sparkfun_serlcd.py code to my "lib" folder, then tried copying the Usage Example code in the README, but when I run it in Mu I get: '''ImportError: no module named 'abc' ''' I don't see an abc library in adafruit's standard CircuitPython lib folder for CP 6. I'm sure I'm missing something basic I don't understand. I think "abc" is a standard Python module, but it doesn't seem to be in CircuitPython. Looks like this was originally run on a Raspberry Pi where a fully Python implementation was on the board, but I'm trying to run it on an Arduino Nano RP2040 Connect, so perhaps that's why I don't have "abc". If so, then is it even possible to run this library on a microcontroller? Thanks for setting me straight. I'll assume after this is done, then I should be able to simply: serlcd.print("Hello, World") Thanks! John

fourstix commented 3 years ago

Sorry I didn't see this issue until now, GitHub hasn't been alerting me on updates to this project. Abstract Base Classes are more of a convenience than anything, and aren't required. Plus I didn't realize this was only supported on Rapiberry Pi version of Python, so it's good to remove the ABC.

Fortunately, another user Mitag, forked this code and removed the ABC. I just merged his changes into the code so the ABC dependency should be gone now.