Gameboypi/SPW

Raspberry Pi Zero 2 W

Opened this issue · 15 comments

The Raspberry Pi Z2W was announced today [1], and I've got one in the mail.

I intend on using it for another build (using up my batch PCB order). As far as I can tell, everything matches up with the previous iteration, layout wise.

Although it does have a different power requirement : 5V/2.5A compares to the previous 5V/1.2A

Not sure if there's anything else to look out for, so I'm assuming this one will be more of a drop-in upgrade than the Radxa Zero potentially could have been.

If you're into videos, ETA prime ran a few benchmarks and Retroarch on the board already [2].

[1] - https://www.cnx-software.com/2021/10/28/raspberry-pi-zero-2-w-and-zero-w-features-comparison/

[2] - https://www.youtube.com/watch?v=Jm8RiqAdHQE

Has anyone gotten this working? I had to use the Rpi3 image and cant get the screen working for some reason. I checked all of the connections as advised and all are good. Any help is greatly appreciated.

try this?

sudo apt-get install cmake
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
cd fbcp-ili9341
mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DILI9341=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 ..
make -j
sudo ./fbcp-ili9341

I tried that exact code but unfortunately that didn't work either

You need to build the juj drivers for the display to work

Also add the driver to the rc.local file so it runs at startup :)

https://github.com/juj/fbcp-ili9341#launching-the-display-driver-at-startup

I appreciate the help, but it doesn't work. Stays on white screen and the command line sticks at "All initialized, now running main loop"

Seems like you build the driver correctly since its turning on.
White screen sounds like a wiring/soldering issue.

Keep the screen attached via the ribbon cable and check continuity between the control-points on the screen-connector PCB

image

Also, make sure that there are no solder-bridges between the pins (other than ground).

I was able to make it work while using -DILI9340=ON and not -DILI9341=ON on my zero 2w.
Hope this help!

Tôi đã có thể làm cho nó hoạt động trong khi sử dụng -DILI9340 = ON chứ không phải -DILI9341 = ON trên 0 2w của tôi. Hy vọng điều này giúp đỡ!

i'm noob. Please, can you give me retropie image for pi zero 2 w? tThank you so much!

@Dflix00 I don't have the image for retro pi zero 2w but I have all my note.

Need to install retropie because image works problem with wifi for zero 2w.
https://files.retropie.org.uk/images/weekly/
retropie-buster-4.7.20-rpi2_3_zero2w.img.gz

Connect via SSH
pi@192.168.1.2 (or your ip)

VIDEO DRIVER
sudo apt-get install cmake
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
cd fbcp-ili9341
mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DILI9340=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 ..
make -j
sudo ./fbcp-ili9341

BOOT WITH DRIVER
For example, if you used the command line steps listed above to build, the file /etc/rc.local would receive a line
sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &

MAPPING GPIO
‪cd‬
curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh

‪sudo bash retrogame.sh‬

Select PIGRRL 2 CONTROLS

‪LEFT 23 # Joypad left‬
‪RIGHT 0 # Joypad right‬
‪UP 22 # Joypad up‬
‪DOWN 1 # Joypad down‬
‪LEFTCTRL 16 # 'A' button‬
‪LEFTALT 6 # 'B' button‬
‪Z 26 # 'X' button‬
‪X 17 # 'Y' button‬
‪SPACE 5 # 'Select' button‬
‪ENTER 12 # 'Start' button‬
‪A 27 # Left shoulder button‬
‪S 20 # Right shoulder button‬
‪ESC 13 # Exit ROM; PiTFT Button 1‬

FOR AUDIO
curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash

IF FAILED TO OPEN MIXER

Then, I took a look at opt\retropie\configs\all\emulationstation\es_settings.cfg and found these settings:


I changed the AudioDevice to this:

FOR BIGFONT
sudo dpkg-reconfigure console-setup
LATIN 15
TERMINUS BOLD
16x8

USE THEME - PIXEL TFT to see games better

CONFIGURE button for volume in game
https://retropie.org.uk/forum/topic/17589/how-to-make-volume-up-and-volume-down-with-buttons/22

To see battery %
https://github.com/bverc/retropie-status-overlay

POWER OFF BUTTON
https://www.raspberrypi-spy.co.uk/2018/03/raspberry-pi-retropie-shutdown-button/
use PULL 0

Hope this help!

@Dflix00 I don't have the image for retro pi zero 2w but I have all my note.

Need to install retropie because image works problem with wifi for zero 2w.
https://files.retropie.org.uk/images/weekly/
retropie-buster-4.7.20-rpi2_3_zero2w.img.gz

Connect via SSH
pi@192.168.1.2 (or your ip)

VIDEO DRIVER
sudo apt-get install cmake
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
cd fbcp-ili9341
mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DILI9340=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 ..
make -j
sudo ./fbcp-ili9341

BOOT WITH DRIVER
For example, if you used the command line steps listed above to build, the file /etc/rc.local would receive a line
sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &

MAPPING GPIO
‪cd‬
curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh

‪sudo bash retrogame.sh‬

Select PIGRRL 2 CONTROLS

‪LEFT 23 # Joypad left‬
‪RIGHT 0 # Joypad right‬
‪UP 22 # Joypad up‬
‪DOWN 1 # Joypad down‬
‪LEFTCTRL 16 # 'A' button‬
‪LEFTALT 6 # 'B' button‬
‪Z 26 # 'X' button‬
‪X 17 # 'Y' button‬
‪SPACE 5 # 'Select' button‬
‪ENTER 12 # 'Start' button‬
‪A 27 # Left shoulder button‬
‪S 20 # Right shoulder button‬
‪ESC 13 # Exit ROM; PiTFT Button 1‬

FOR AUDIO
curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash

IF FAILED TO OPEN MIXER

Then, I took a look at opt\retropie\configs\all\emulationstation\es_settings.cfg and found these settings:


I changed the AudioDevice to this:

FOR BIGFONT
sudo dpkg-reconfigure console-setup
LATIN 15
TERMINUS BOLD
16x8

USE THEME - PIXEL TFT to see games better

CONFIGURE button for volume in game
https://retropie.org.uk/forum/topic/17589/how-to-make-volume-up-and-volume-down-with-buttons/22

To see battery %
https://github.com/bverc/retropie-status-overlay

POWER OFF BUTTON
https://www.raspberrypi-spy.co.uk/2018/03/raspberry-pi-retropie-shutdown-button/
use PULL 0

Hope this help!

I try to follow the instructions, hope it works. Thank you very much

@Dflix00 I don't have the image for retro pi zero 2w but I have all my note.
Need to install retropie because image works problem with wifi for zero 2w.
https://files.retropie.org.uk/images/weekly/
retropie-buster-4.7.20-rpi2_3_zero2w.img.gz
Connect via SSH
pi@192.168.1.2 (or your ip)
VIDEO DRIVER
sudo apt-get install cmake
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
cd fbcp-ili9341
mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DILI9340=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 ..
make -j
sudo ./fbcp-ili9341
BOOT WITH DRIVER
For example, if you used the command line steps listed above to build, the file /etc/rc.local would receive a line
sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &
MAPPING GPIO
‪cd‬
curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh
‪sudo bash retrogame.sh‬
Select PIGRRL 2 CONTROLS
‪LEFT 23 # Joypad left‬
‪RIGHT 0 # Joypad right‬
‪UP 22 # Joypad up‬
‪DOWN 1 # Joypad down‬
‪LEFTCTRL 16 # 'A' button‬
‪LEFTALT 6 # 'B' button‬
‪Z 26 # 'X' button‬
‪X 17 # 'Y' button‬
‪SPACE 5 # 'Select' button‬
‪ENTER 12 # 'Start' button‬
‪A 27 # Left shoulder button‬
‪S 20 # Right shoulder button‬
‪ESC 13 # Exit ROM; PiTFT Button 1‬
FOR AUDIO
curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash
IF FAILED TO OPEN MIXER
Then, I took a look at opt\retropie\configs\all\emulationstation\es_settings.cfg and found these settings:

I changed the AudioDevice to this:

FOR BIGFONT
sudo dpkg-reconfigure console-setup
LATIN 15
TERMINUS BOLD
16x8
USE THEME - PIXEL TFT to see games better
CONFIGURE button for volume in game
https://retropie.org.uk/forum/topic/17589/how-to-make-volume-up-and-volume-down-with-buttons/22
To see battery %
https://github.com/bverc/retropie-status-overlay
POWER OFF BUTTON
https://www.raspberrypi-spy.co.uk/2018/03/raspberry-pi-retropie-shutdown-button/
use PULL 0
Hope this help!

I try to follow the instructions, hope it works. Thank you very much

A couple of the lines you have mentioned settings and changes with no information. specifically the settings in es_settings.cfg and what you changed your audio device to. Do you recall what they are? Is this only if an error is generated?

I'm at the point where I need to configure the PI before soldering it onto the board, but I'm apprehensive because I cannot remove the SD card once it's in place.

Any additional context would be awesome.

Then, I took a look at opt\retropie\configs\all\emulationstation\es_settings.cfg and found these settings:

<string name="AudioCard" value="default" />
<string name="AudioDevice" value="HDMI" />

I changed the AudioDevice to this:
<string name="AudioDevice" value=“PCM />

You can still connect to the raspberry pi with SSH to modify the code.
make sure you set access to ssh when you flash buster on the microSD card
and after that use ssh pi@192.168.XXX.XXX to whatever your IP is to connect.
Cheers!

IMG_3079
I applaud your work.
I have completed the zero2w version spw as of 2023 and your comments have been really helpful.

Finally, can you share your config.ini content regarding battery level?
After installing ADS1015, I am wandering about settings such as VMaxDischarging :)

Hey
Can anyone share their config.txt and es_settings.cfg ?

My screen, button and game works pretty well, but the sound does not work.
Wire checking ok and I installed it in the comments above, but i have the message "Device or resource busy"