-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Description
Description
In the current stable release v1.0.2 and main, the LCD display is not working. When I run e.g. the example lcd.py, I only see the backlight switching on, but no image appears. Same for all other examples, like all-in-one.py and more. I noticed that before running lcd.py script, the pinctrl shows:
9: a0 -- | lo // GPIO9 = SPI0_MISO
10: a0 -- | lo // GPIO10 = SPI0_MOSI
11: a0 -- | lo // GPIO11 = SPI0_SCLK
12: op -- -- | lo // GPIO12 = output
After running the script, the pinctrl command shows:
9: op -- -- | hi // GPIO9 = output
10: a0 -- | lo // GPIO10 = SPI0_MOSI
11: a0 -- | lo // GPIO11 = SPI0_SCLK
12: op -- -- | lo // GPIO12 = output
GPIO 9 is no longer assigned as SPI MISO.
I tried changing the initialization of the ST7735 class like suggested pimoroni/st7735-python#12 (comment), but that didn't resolve the problem:
# Create LCD class instance.
disp = st7735.ST7735(
port=0,
cs=st7735.BG_SPI_CS_FRONT,
dc="GPIO9",
backlight="GPIO12",
rotation=270,
spi_speed_hz=10000000
)Another suggestion from #146:
# Create LCD class instance.
disp = st7735.ST7735(
port=0,
cs=1,
dc="09",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)But also no success...
Steps to reproduce
- Create new image with Rasberry Pi imager, using Raspberry Pi OS lite, 32bit, bookworm
- Once logged in and before checking out enviroplus-python, run commands below to make the installer happy:
# Make static link for /boot/config.txt.
sudo mv /boot/config.txt /boot/config.bu.txt
sudo ln -s /boot/firmware/config.txt /boot/config.txt
# Install PIL and numpy, since they are missing in the dependencies of install.sh and depend on non pure python libraries.
apt update
apt install git python-pil python-numpy- Follow instructions from this page: Installing the Enviro+ Python library
System Information
System Information
------------------
Raspberry Pi Zero W Rev 1.1
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
Raspberry Pi reference 2024-11-19
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, b15527e15ba4d9e65126a454bfec2040b909dc1c, stage2
Linux enviro 6.6.51+rpt-rpi-v6 #1 Raspbian 1:6.6.51-1+rpt3 (2024-10-08) armv6l GNU/Linux
Revision : 9000c1
Serial : 00000000c3ac7c8a
Model : Raspberry Pi Zero W Rev 1.1
Throttled flag : throttled=0x0
Camera : supported=0 detected=0, libcamera interfaces=0
pin configuration
-----------------
0: ip -- | hi // ID_SDA/GPIO0 = input
1: ip -- | hi // ID_SCL/GPIO1 = input
2: a0 -- | hi // GPIO2 = SDA1
3: a0 -- | hi // GPIO3 = SCL1
4: ip -- | hi // GPIO4 = input
5: ip -- | hi // GPIO5 = input
6: ip -- | hi // GPIO6 = input
7: op -- -- | hi // GPIO7 = output
8: op -- -- | hi // GPIO8 = output
9: a0 -- | lo // GPIO9 = SPI0_MISO
10: a0 -- | lo // GPIO10 = SPI0_MOSI
11: a0 -- | lo // GPIO11 = SPI0_SCLK
12: ip -- | lo // GPIO12 = input
13: ip -- | lo // GPIO13 = input
14: ip -- | lo // GPIO14 = input
15: ip -- | hi // GPIO15 = input
16: ip -- | lo // GPIO16 = input
17: ip -- | lo // GPIO17 = input
18: ip -- | lo // GPIO18 = input
19: ip -- | lo // GPIO19 = input
20: ip -- | lo // GPIO20 = input
21: ip -- | lo // GPIO21 = input
22: ip -- | hi // GPIO22 = input
23: ip -- | lo // GPIO23 = input
24: ip -- | lo // GPIO24 = input
25: ip -- | lo // GPIO25 = input
26: ip -- | lo // GPIO26 = input
27: ip -- | hi // GPIO27 = input
28: ip -- | hi // SDA0/GPIO28 = input
29: ip -- | hi // SCL0/GPIO29 = input
30: a3 -- | lo // CTS0/GPIO30 = CTS0
31: a3 -- | lo // RTS0/GPIO31 = RTS0
32: a3 -- | hi // TXD0/GPIO32 = TXD0
33: a3 -- | hi // RXD0/GPIO33 = RXD0
34: a3 -- | hi // SD1_CLK/GPIO34 = SD1_CLK
35: a3 -- | hi // SD1_CMD/GPIO35 = SD1_CMD
36: a3 -- | hi // SD1_DATA0/GPIO36 = SD1_DAT0
37: a3 -- | hi // SD1_DATA1/GPIO37 = SD1_DAT1
38: a3 -- | hi // SD1_DATA2/GPIO38 = SD1_DAT2
39: a3 -- | hi // SD1_DATA3/GPIO39 = SD1_DAT3
40: op -- -- | lo // CAM_GPIO1/GPIO40 = output
41: op -- -- | hi // WL_ON/GPIO41 = output
42: ip -- | lo // NC/GPIO42 = input
43: a0 -- | lo // WIFI_CLK/GPIO43 = GPCLK2
44: op -- -- | lo // CAM_GPIO0/GPIO44 = output
45: op -- -- | hi // BT_ON/GPIO45 = output
46: ip -- | hi // HDMI_HPD_N/GPIO46 = input
47: op -- -- | hi // STATUS_LED_N/GPIO47 = output
48: a0 -- | lo // SD_CLK_R/GPIO48 = SD0_CLK
49: a0 -- | hi // SD_CMD_R/GPIO49 = SD0_CMD
50: a0 -- | hi // SD_DATA0_R/GPIO50 = SD0_DAT0
51: a0 -- | hi // SD_DATA1_R/GPIO51 = SD0_DAT1
52: a0 -- | hi // SD_DATA2_R/GPIO52 = SD0_DAT2
53: a0 -- | hi // SD_DATA3_R/GPIO53 = SD0_DAT3
Output of install.sh
pi@enviro:~/enviroplus-python $ ./install.sh
Installing enviroplus...
This script should be run in a virtual Python environment.
Would you like us to create and/or use a default one? [y/N] y
Creating a new virtual Python environment in /home/pi/.virtualenvs/pimoroni, please wait...
Checking for /home/pi/Pimoroni/auto_venv.sh
Creating /home/pi/Pimoroni/auto_venv.sh
Checking Dependencies. Please wait...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: toml in /usr/lib/python3/dist-packages (0.10.2)
Installing for Python 3.11.2...
Checking for python3
Checking for python3-pip
Checking for python3-cffi
Checking for libportaudio2
Installing missing packages: python3-cffi libportaudio2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libjack-jackd2-0 libopus0 python3-cffi-backend python3-ply python3-pycparser
Suggested packages:
jackd2 opus-tools python-ply-doc
The following NEW packages will be installed:
libjack-jackd2-0 libopus0 libportaudio2 python3-cffi python3-cffi-backend python3-ply python3-pycparser
0 upgraded, 7 newly installed, 0 to remove and 18 not upgraded.
Need to get 773 kB of archives.
After this operation, 3,306 kB of additional disk space will be used.
Get:1 http://mirror.solnet.ch/raspbian/raspbian bookworm/main armhf libopus0 armhf 1.3.1-3 [171 kB]
Get:2 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libjack-jackd2-0 armhf 1.9.21~dfsg-3 [230 kB]
Get:3 http://mirror.init7.net/raspbian/raspbian bookworm/main armhf libportaudio2 armhf 19.6.0-1.2 [57.3 kB]
Get:4 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf python3-cffi-backend armhf 1.15.1-5+b1 [83.1 kB]
Get:5 http://mirror.init7.net/raspbian/raspbian bookworm/main armhf python3-ply all 3.11-5 [65.8 kB]
Get:6 http://mirror.init7.net/raspbian/raspbian bookworm/main armhf python3-pycparser all 2.21-1 [78.8 kB]
Get:7 http://mirror.init7.net/raspbian/raspbian bookworm/main armhf python3-cffi all 1.15.1-5 [86.2 kB]
Fetched 773 kB in 2s (418 kB/s)
Selecting previously unselected package libopus0:armhf.
(Reading database ... 69439 files and directories currently installed.)
Preparing to unpack .../0-libopus0_1.3.1-3_armhf.deb ...
Unpacking libopus0:armhf (1.3.1-3) ...
Selecting previously unselected package libjack-jackd2-0:armhf.
Preparing to unpack .../1-libjack-jackd2-0_1.9.21~dfsg-3_armhf.deb ...
Unpacking libjack-jackd2-0:armhf (1.9.21~dfsg-3) ...
Selecting previously unselected package libportaudio2:armhf.
Preparing to unpack .../2-libportaudio2_19.6.0-1.2_armhf.deb ...
Unpacking libportaudio2:armhf (19.6.0-1.2) ...
Selecting previously unselected package python3-cffi-backend:armhf.
Preparing to unpack .../3-python3-cffi-backend_1.15.1-5+b1_armhf.deb ...
Unpacking python3-cffi-backend:armhf (1.15.1-5+b1) ...
Selecting previously unselected package python3-ply.
Preparing to unpack .../4-python3-ply_3.11-5_all.deb ...
Unpacking python3-ply (3.11-5) ...
Selecting previously unselected package python3-pycparser.
Preparing to unpack .../5-python3-pycparser_2.21-1_all.deb ...
Unpacking python3-pycparser (2.21-1) ...
Selecting previously unselected package python3-cffi.
Preparing to unpack .../6-python3-cffi_1.15.1-5_all.deb ...
Unpacking python3-cffi (1.15.1-5) ...
Setting up python3-ply (3.11-5) ...
Setting up python3-pycparser (2.21-1) ...
Setting up libopus0:armhf (1.3.1-3) ...
Setting up libjack-jackd2-0:armhf (1.9.21~dfsg-3) ...
Setting up python3-cffi-backend:armhf (1.15.1-5+b1) ...
Setting up libportaudio2:armhf (19.6.0-1.2) ...
Setting up python3-cffi (1.15.1-5) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u9) ...
Processing triggers for man-db (2.11.2-2) ...
Installing stable library from pypi.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting enviroplus
Downloading https://www.piwheels.org/simple/enviroplus/enviroplus-1.0.2-py3-none-any.whl (10 kB)
Collecting ads1015>=1.0.0
Downloading https://www.piwheels.org/simple/ads1015/ads1015-1.0.0-py3-none-any.whl (9.0 kB)
Collecting astral
Downloading https://www.piwheels.org/simple/astral/astral-3.2-py3-none-any.whl (38 kB)
Collecting font-roboto
Downloading https://www.piwheels.org/simple/font-roboto/font_roboto-0.0.1-py3-none-any.whl (2.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 1.4 MB/s eta 0:00:00
Collecting fonts
Downloading https://www.piwheels.org/simple/fonts/fonts-0.0.3-py3-none-any.whl (4.2 kB)
Collecting gpiod>=2.1.3
Using cached https://www.piwheels.org/simple/gpiod/gpiod-2.2.3-cp311-cp311-linux_armv6l.whl (91 kB)
Collecting gpiodevice>=0.0.3
Using cached https://www.piwheels.org/simple/gpiodevice/gpiodevice-0.0.5-py3-none-any.whl (9.2 kB)
Collecting ltr559>=1.0.0
Downloading https://www.piwheels.org/simple/ltr559/ltr559-1.0.0-py3-none-any.whl (10 kB)
Collecting paho-mqtt
Downloading https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-2.1.0-py3-none-any.whl (67 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.2/67.2 kB 598.5 kB/s eta 0:00:00
Collecting pimoroni-bme280>=1.0.0
Downloading https://www.piwheels.org/simple/pimoroni-bme280/pimoroni_bme280-1.0.0-py3-none-any.whl (7.8 kB)
Collecting pms5003>=1.0.0
Downloading https://www.piwheels.org/simple/pms5003/pms5003-1.0.1-py3-none-any.whl (7.9 kB)
Collecting pytz
Downloading https://www.piwheels.org/simple/pytz/pytz-2024.2-py3-none-any.whl (507 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 508.0/508.0 kB 1.1 MB/s eta 0:00:00
Collecting sounddevice
Downloading https://www.piwheels.org/simple/sounddevice/sounddevice-0.5.1-py3-none-any.whl (32 kB)
Collecting st7735>=1.0.0
Using cached https://www.piwheels.org/simple/st7735/st7735-1.0.0-py3-none-any.whl (11 kB)
Collecting i2cdevice>=1.0.0
Downloading https://www.piwheels.org/simple/i2cdevice/i2cdevice-1.0.0-py3-none-any.whl (10 kB)
Collecting pyserial
Downloading https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 kB 179.6 kB/s eta 0:00:00
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from st7735>=1.0.0->enviroplus) (1.24.2)
Requirement already satisfied: spidev>=3.4 in /usr/lib/python3/dist-packages (from st7735>=1.0.0->enviroplus) (3.5)
Requirement already satisfied: CFFI>=1.0 in /usr/lib/python3/dist-packages (from sounddevice->enviroplus) (1.15.1)
Requirement already satisfied: smbus2 in /usr/lib/python3/dist-packages (from i2cdevice>=1.0.0->ads1015>=1.0.0->enviroplus) (0.4.2)
Installing collected packages: pytz, pyserial, fonts, font-roboto, st7735, sounddevice, paho-mqtt, i2cdevice, gpiod, astral, pimoroni-bme280, ltr559, gpiodevice, ads1015, pms5003, enviroplus
Successfully installed ads1015-1.0.0 astral-3.2 enviroplus-1.0.2 font-roboto-0.0.1 fonts-0.0.3 gpiod-2.2.3 gpiodevice-0.0.5 i2cdevice-1.0.0 ltr559-1.0.0 paho-mqtt-2.1.0 pimoroni-bme280-1.0.0 pms5003-1.0.1 pyserial-3.5 pytz-2024.2 sounddevice-0.5.1 st7735-1.0.0
Done!
Using config.txt in /boot/firmware
Running setup commands...
Setting up i2c and SPI..
Backing up /boot/firmware/config.txt to /boot/firmware/config.preinstall-enviroplus-2024-12-31-12-23-46.txt
Running: "sudo raspi-config nonint do_spi 0"
Running: "sudo raspi-config nonint do_i2c 0"
Setting up serial for PMS5003..
Running: "sudo raspi-config nonint do_serial_cons 1"
Running: "sudo raspi-config nonint do_serial_hw 0"
Adding dtoverlay=pi3-miniuart-bt to /boot/firmware/config.txt
dtoverlay=pi3-miniuart-bt
Adding dtoverlay=adau7002-simple to /boot/firmware/config.txt
dtoverlay=adau7002-simple
Would you like to copy examples to /home/pi/Pimoroni/enviroplus? [y/N] y
Copying examples to /home/pi/Pimoroni/enviroplus
Done!
Would you like to generate documentation? [y/N] n
All done!
If this is your first time installing you should reboot for hardware changes to take effect.
Find uninstall steps in /home/pi/Pimoroni/enviroplus/uninstall.sh
Possible similar issues
Metadata
Metadata
Assignees
Labels
No labels