UCTRONICS / SKU_RM0004

Raspberry Pi NAS Cluster/Raspberry Pi SATA Cluster
49 stars 30 forks source link

Steps to set up Pi Rack Pro OLED Ubuntu 22.04.3 LTS #34

Open danbyers1 opened 6 months ago

danbyers1 commented 6 months ago

This is a quick write up to get the OLED's working for those who are using Ubuntu Server 22.04.3 LTS as the instructions provided from UCTRONICS are specific to Pi OS.

Note that I've not got the Pi's to work with the shutdown button using aftermarket PoE hats. This will come later and I'll edit this post when I find it.

Steps to set up Pi Rack Pro OLED Ubuntu 22.04.3 LTS

Install raspi-config sudo apt install raspi-config

enable i2c sudo raspi-config Select 3. Interface Options and press enter Select I5. Enable/Disable automatic loading of I2C kernel module and press enter Select Yes Select Finish

Add all of the following to the /boot/firmware/config.txt

Add all of the following to the /boot/firmware/config.txt under the second [all] section, and place a # in front of "dtparam=audio=on" to comment it out/disable it.

sudo nano /boot/firmware/config.txt

dtparam=i2c_arm=on dtparam=i2c_arm_baudrate=400000 dtoverlay=gpio-shutdown dtoverlay=gpio_pin=4 dtoverlay=active_low=1 dtoverlay=gpio_pull=up

Control O to save, Enter to commit the changes, Control X to exit

Install the following python packages sudo apt install -y python3-pip python3-dev python3-pil python3-setuptools python3-rpi.gpio i2c-tools

Add your user to the i2c group - Be sure to change (username) with your user ID sudo usermod -aG i2c username

Clone the RM0004 repository git clone https://github.com/UCTRONICS/SKU_RM0004.git

Running the "./deployment_service.sh" file in the SKU_RM0004 directory:

Be sure to edit the "deployment_service.sh" file - you will want to update the /boot/config.txt information to reflect /boot/firmware/config.txt, and save it.

**Change the deployment_service.sh file cd SKU_RM0004 sudo nano deployment_service.sh

After you've saved it, you should be able to successfully run it.

Compile cd SKU_RM0004 make

Run the display ./display

you should see the IP of your host, CPU, Memory, Ram, and Temp

Control C to exit the display

Now add the automatic start script - change (username) to the userID

sudo nano /etc/rc.local

!/bin/sh -e

cd /home/username/SKU_RM0004 make clean make ./display& exit 0

Control O to save, Enter to commit the changes, Control X to exit

Change rc.local from read only to executable sudo chmod -v +x /etc/rc.local

Enable rc.local sudo systemctl enable rc-local.service

Start rc.local sudo systemctl start rc-local.service

Validate rc.local service is active sudo systemctl status rc-local.service

Reboot sudo reboot

Your OLED should magically work now without manually running the ./display file.

There are a few folks here that contributed to the overall solutions and want to Thank - WhirlyHat for finding the correct path to the boot file, and bigbrovar for the i2c info and python packages. The Automatic start up script, I had to google and got the answer.

mrm695 commented 2 months ago

Thanks to much of what's posted here an other threads, I have the UCTRONICS OLED screen running properly on Ubuntu Server 22.04.4 LTS. One of the issues I am having is with the POWER BUTTON. I cannot seem to get it working while running the Desktop Environment (GNOME). Does the power button only function while running outside the DE?