sbcshop / PiSquare

PiSquare is an RP2040 and ESP-12E-based board that allows you to use multiple Raspberry Pi HATs without stacking them on top of one other. PiSquare uses Socket programming to wirelessly communicate multiple Raspberry Pi HATs ("n" numbers of HATs).
MIT License
25 stars 5 forks source link

ImportError: no module named 'st7789' #10

Closed SubOptimal closed 1 year ago

SubOptimal commented 2 years ago

I followed the instruction in sbcshop/PiSquare/Run RaspberryPi HATs On PiSquare Using Sockets.

When I run sbcshop/PiSquare/Run RaspberryPi HATs On PiSquare Using Sockets/Single Socket/pisquare_client_run_hat.py it fails with ImportError: no module named 'st7789'.

The module is imported by sbcshop/PiSquare/Run RaspberryPi HATs On PiSquare Using Sockets/Single Socket/library/gpio_config.py#L10 but it's not included in this repository.

On the PiSquare following MicroPython version is installed.

MicroPython v1.18 on 2022-01-17; Raspberry Pi Pico with RP2040
Type "help()" for more information.

It's the version which was preinstalled on the PiSquare.

misel228 commented 2 years ago

I know it's not a perfect solution but I've helped myself by putting this file from the examples onto the Pico.

https://github.com/sbcshop/PiSquare/blob/main/Basic%20And%20Demo%20Codes/Onboard%20OLED%20Test/ssd1306.py

If you're using Thonny you can select the storage place as either Pico or PC and then select the Pico and make sure the file name stays the same.

SubOptimal commented 2 years ago

The ssd1306.py isn't a problem as it is provided in the library folder https://github.com/sbcshop/PiSquare/blob/main/Run%20RaspberryPi%20HATs%20On%20PiSquare%20Using%20Sockets/Single%20Socket/library/ssd1306.py

Updating the MicroPython firmware on the PiSquare with this version https://github.com/sbcshop/PiSquare/blob/main/Run%20raspberry%20HAT's%20on%20PiSquare/Barcode%20HAT/firmware.uf2 solved the described issue for me.

sbcshop1 commented 2 years ago

This issue is of st7789 library, to resolve this query go through the below link - https://github.com/sbcshop/PiSquare/blob/main/Run%20raspberry%20HAT's%20on%20PiSquare/1.3%20Lcd%20HAT/firmware.uf2

The firmware includes frozen python font files and pre-compiled objects with the st7789 C driver for a variety of devices

Holding down the PiSquare BOTSEL button while dragging this file(firmware.uf2) into the mounted RP2 folder will allow you to load it.