Issue with GPIO Setup on Raspberry Pi 5 running BalenaOS 5.1.37+rev5

Hello everyone,

I am currently working on a project using BalenaOS 5.1.37+rev5 on a Raspberry Pi 5. I’m using the sample repository from GitHub: balena-rpi-gpio-sample-with-python.

However, I am encountering an issue when trying to run the provided Python script for GPIO operations. The script produces the following warning messages:

 main  gpio_example.py:14: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
 main    GPIO.setup(gpioList2, GPIO.OUT)
 main  gpio_example.py:14: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
 main    GPIO.setup(gpioList2, GPIO.OUT)

Has anyone experienced a similar issue or can provide some insights into what might be causing these warnings and how to fix them? Any help would be greatly appreciated!

Thank you!

If you’re having issues with GPIO setup on Raspberry Pi 5 running BalenaOS 5.1.37+rev5, ensure you have the correct device tree overlay in place. Check your config.txt file for correct GPIO configuration and ensure all necessary permissions are set. Additionally, verify that your code correctly references the GPIO pins and that you have the latest firmware updates.

What worked for me is switching to Raspberry Pi 4, and everything works fine.