Raspberry Pi Zero W (and Zero 2 W):
Materials
Setup Procedure
Other Helpful Proceedures
Configure a Program to Run on Startup
Configure a Static IP
Raspberry Pi 4 Model B:
OS Information
System Preferences
Install Applications
Set GPU Memory
Setup Desktop
- Raspberry Pi Zero W or Zero 2 W
- 20x2 pin header (if header is not included with Pi)
- MicroSD card - at least 4GB
- HDMI-to-Mini HDMI Cable or adapter.
- USB-to-MicroUSB cable or adapter
- 5V power supply, at least 2.5A
- Monitor
- Keyboard
- Download the Raspberry Pi imager on a separate computer: Pi Imager installation
- Follow imager instructions to install Lite OS to flash drive. (32-Bit Laegacy port of Bullseye)
- Download
ssh
file from above (or create a blank file and name it ssh). NOTE: This file has no contents. It's only purpose is to signal to the RPi that SSH should be enabled.
- Copy the ssh file to the flash drive.
- Remove the flash drive from the computer and place in the Raspberry Pi Zero 2 W.
- Connect your peripherals and boot the device.
- Once the device boots, follow instructions on screen to set keyboard layout, username, and password.
NOTE: If there is no video output, but you have a green light, there is likely a problem with the HDMI. See troubleshooting below.
- Record username and password somewhere safe.
- Configure your Wifi by typing this into the command line:
sudo raspi-configSelect "System Settings" and then "Wireless LAN"
The "SSID" refers to the name of your network
The "psk" is your password.
- Set the timezone. From the raspi-config menu, select "4."
- Update your device
sudo apt-get update sudo apt-get upgrade sudo reboot
- Install Git:
sudo apt install git git config --global user.email "you@example.com" git config --global user.name "Your Name"
NOTE: You may need to generate a key to be able to clone:
Documentation for creating a key: Managing Your Personal Access TokensOnce a key is generated, configure git:
git config --global credential.helper store sudo nano ~/.git-credentials
- (Optional) Configure Static IP Address >> This is useful if you want to be able to access your device remotely via SSH.
- Modify etc/rc.local with admin priviliges:
sudo nano /etc/rc.local
- Add this line to /etc/rc.local:
sudo python /home/pi/yourprogram/program.py &
Replace
pi
with your directoryDon't forget the
&
at the end to allow the program to run in the background
- Stopping the process:
- To stop the process, first find the PID number:
ps aux | grep "main.py"
Note the number in the second column.
Ternimate Process:
sudo kill -TERM ###
- replace "###" with the number from step 4
Summary of Article
- Find
Gateway
info forwlan0
:route -neThen find your
IP address
:ip addr
- Nameserver:
cat /etc/resolv.conf
Take a picture of the screen.
Configure settings:
sudo nano /etc/dhcpcd.conf
- Add this line to the end of the file:
interface eth0 static ip_address=192.168.1.100 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 2001:558:feed::1 2001:558:feed::2 interface wlan0 static ip_address=192.168.1.101 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 2001:558:feed::1 2001:558:feed::2
- static ip_address: This is the static IP address you’ll use to SSH or remotely connect to your Pi. Take your default gateway IP (found in the steps above), and change the last number to any other number between 0 and 255.
- static routers: This is your default gateway IP address.
- static domain_name_servers: These are the IP’s we found in the resolv.conf file above. Separate each IP with a single space.
- Set
wlan0
differently thanetho0
Newest working:
Pi OS (Legacy) port of Bullseye 32bit
. Useconfig.txt
from the/pi4
directory.Critical changes to
config.txt
Uncomment these lines:
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=85
(Able to change to 82 for higher resolution after setup)Summary:
My Pi 4 was running
Buster(*v10*)
. I had never runBullseye(*v11*)
, butBookworm(*v12*)
is now the latest version at the time of writing. I attempted to create a new OS image on a 32GB microSD card (I replicated this process across multiple cards to verify they were not faulty). I tried bothBookworm
andBullseye
in both 32 and 64 bit versions. I was repeatedly unable to get video, but was able to verfiy device was booting because green light was active, and my old setup still worked when I put that SD card in the Pi. Theconfig.txt
file fromBuster
did not work with either of the newer versions. I went through many itteratons of trying to get the HDMI working. Ultimately the resolution boiled down to a few of things:
- The
Bookworm
system still did not boot with the working config.txt file above. I beleive there is more to this problem than justconfig.txt
.- The working config file works with the
Bullsye
32-bit setup. Theconfig.txt
file located in the/pi4
directry of this repo.- The changes listed above seemed to be the fixing changes.
A port to
Bookworm
has been unsuccessful ths far, unable to get any of my current displays to function with it.
Firefox:
- Install through OS package installer:
Preferences
>Add/Remove Software
Mozilla Firefox web browser - Extended Support Release (ESR)
Visual Sudio Code:
- Install through:
Preferences
>Recommended Software
Visual Studio Code
- After Installing VS Code:
- Install Python Extension
- Install Prettier Extension
The default memory (76MB) is fine for most things. Videos will need more at higher resolutions.
Preferences
>Rasberry Pi Configuration
>Performance
Tab >GPU Memory
- Set value to
124
. NOTE: Going higher than 128MB can result in failure to boot.
Task bar items:
- Right click on the launch area of the task bar (the icons that are already pinned)
- Click
Application Launch Bar Settings
- Add Firefox and Visual Studio to the taskbar. Remove Chromium.
Desktop Apearance:
- Right click on the desktop and click
Desktop Appearance
.- Select background and color scheme. (I like aurora for the background image, and dark green for taskbar.)