Skip to content

Instructions for the Raspberry Pi Zero 2 WH configuration

Ousmane edited this page Feb 9, 2025 · 4 revisions

Installing the OS

For installing the OS, I used the Raspberry Pi Imager with an 16GB SD card. I then took the Ubuntu Server 24.04.1 (64-bit) OS. I don't forget to enable ssh options while editing the configuration.

https://www.raspberrypi.com/software/

OS basic configuration

Since I used the Raspberry Pi without screen (headless), I connect to the pi using ssh via the following command:

ssh user@192.168.xxx.xxx

Where 'user' is the username specified in the Raspberry Pi Imager configuration, and '@192.168.xxx.xxx' is the IP adress of the pi.

More infos: https://pimylifeup.com/raspberry-pi-ip-address/

Once connected to the Raspberry Pi, I upgraded the packages:

sudo apt update && sudo apt upgrade

As Ubuntu does not have raspi-config natively, I have to install it manually:

sudo apt-get install raspi-config

This allows me access to the Raspberry's configurations:

sudo raspi-config

Here are the parameters I modified/enabled:

  • Interface options > Legacy camera
  • Interface options > SPI
  • Interface options > I2C
  • Interface options > Serial Port
  • Interface options > Remote GPIO
  • Performance options > GPU Memory > 128 MB

Don't forget to reboot the pi after editing:

sudo reboot

To start programming

To run my python codes I installed pip:

sudo apt-get install python3-pip

I then installed zram-tools for reducing swap:

sudo apt install zram-tools

You can check that zram-tools is well installed with this command:

zramctl

Clone the repository with git:

git clone https://github.com/Mowibox/Chromapi.git

Enter the folder:

cd Chromapi

And install the required python packages:

pip install -r requirements.txt

I wrote simple tests inside on 'Chromapi/tests' folder to see that everything is working.

Legs and LEDs test:

python3 test_1.py

Ultrasonic sensor test:

python3 test_2.py

Troubleshooting

Look at the Troubleshooting page if you encounter any issues!

Clone this wiki locally