OLED Stats & Ledshim with Retropie
-
I have a micro desktop system with a Raspberry pi 4 8g, Neopixel led, ledshim and 0.96 OLED stats display.
While using raspberry pi os 32 bit, i can start all the python scripts to start the components in the crontab, so when the Pi boots up everything is working.
I tried the same with retropie os and none of the components work i.e. Neopixel led, ledshim and 0.96 OLED stats display
Appreciate any help to configure correctly with retropie
Thanks
-
RetroPie's image is based on Raspberry Pi Lite, so it should work. What Pi model/RetroPie version ? Please add more info.
Are the
python
scripts working if you start them manually ? What scripts are you using (link/post on pastebin.com) ? -
Raspberry Pi 4 8GB
Retropie 4.7.1
Linux 5.10.63-v7l+ armv7l GNU/LinuxAll the below scripts work if run manually
OLED Display -
sudo python3 /home/pi/OLED_Stats/stats.pyLedshim -
sudo python3 /home/pi/Pimoroni/ledshim/examples/rainbow.pyNeopixel Led Ring -
sudo python3 /home/pi/rpi_ws281x//python/examples/strandtest.pyThanks
-
So add the scripts to
autostart.sh
(running in the background) and see if they'll run. Or better yet, create a service for each of them - see an example at https://gist.github.com/emxsys/a507f3cad928e66f6410e7ac28e2990f. -
@mitu said in OLED Stats & Ledshim with Retropie:
o add the scripts to autostart.sh (running in the back
Thanks Mitu, i created a service for each of them and it works fine.
Thanks for your help -
I have noticed an issue with the OLED stats display which still noot working when the Pi boots up.
If the command to run the oled python script is run manually it works.
Appreciate if anyone can help to fix, thanksOLED Setup
sudo apt-get update sudo apt-get full-upgrade sudo reboot Log back into the pi once its booted up again sudo apt-get install python3-pip (select Y to continue when prompted) sudo apt update (select Y to continue when prompted) sudo apt full-upgrade (select Y to continue when prompted) sudo reboot Log back into the pi once its booted up again sudo apt-get install python3-pip sudo pip3 install --upgrade setuptools cd ~ sudo pip3 install --upgrade adafruit-python-shell wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py sudo python3 raspi-blinka.py (select y to continue then Y to REBOOT NOW then login) sudo i2cdetect -y 1 If 3c has not shown up use command raspi-config Interfaces I2c Enable Save Reboot Check again pip3 install adafruit-circuitpython-ssd1306 sudo apt-get install python3-pil (select Y to continue when prompted) sudo pip3 install adafruit-blinka sudo pip3 install adafruit-circuitpython-ssd1306 git clone https://github.com/mklements/OLED_Stats.git cd OLED_Stats python3 stats.py (the oled display should show stats)
OLED Service
cd /lib/systemd/system/ sudo nano oled.service Enter the below in blue into the empty file and save/exit [Unit] Description=oled After=multi-user.target [Service] Type=simple ExecStart=/usr/bin/python3 /home/pi/OLED_Stats/stats.py Restart=on-abort [Install] WantedBy=multi-user.target sudo chmod 644 /lib/systemd/system/oled.service chmod +x /home/pi/OLED_Stats/stats.py sudo systemctl daemon-reload sudo systemctl enable oled.service sudo systemctl start oled.service
-
@bobster316 said in OLED Stats & Ledshim with Retropie:
I have noticed an issue with the OLED stats display which still noot working when the Pi boots up.
Without an actual display, it's difficult to diagnose. But, since you created a service unit for it, why not look at the error messages logged by the service to see what's the error printed by the script ?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.