I’ve been making Raspberry Pi apps for a while now, 32 bits, running on a Pi 4 with Bullseye making use of GPIO.
With the Pi 5, the minimum OS is Bookworm. Is it worth switching to 64-bit and start with a fresh Bookworm, and is it possible to use the GPIO ports then too? Does anyone have any experience driving the GPIO from a Pi 5? At first glance, it’s not possible to use gpiod daemon service, as it does not recognize the Pi 5 yet.
Forget the gpio modules with RPi 5. There will be an official libgpio available but not in xojo yet. You best bet is to use gpioget ans gpioset gpiomon etc trough the shell class.
Alternatively you can use Phidgets with MBS plugins it’s superiorely stable and very flexible.
As Xojo even has a example project for GPIO, it would be nice if it was possible to run that on a raspberry pi 5, and update their example project so that it works, or at least mention that it won’t work on raspberry pi 5.
I would prefer a MBS plugin solution from @Christian_Schmitz as that would make it more neat to use than using shells.
try
var chip as Gpiod.Chip = Gpiod.Chip.OpenByName("/dev/gpiochip0")
var info as Gpiod.ChipInfo = chip.GetInfo()
MessageBox("Name: " + info.Name)
MessageBox("Label: " + info.Label)
MessageBox("LineCount: " + info.LineCount.ToString())
catch e as GpiodException
MessageBox(e.Message)
end try
I only did enough to be able to do their first hello world example.
I will put it as Open source repo in few days regardless if I continue or finish it.
(Don’t got extremely much lust for gpio right now but we will see)
The above code worked on RP 4 64 bit and did not require libpgio to be installed or any other library. As in the plugin carried the libpgio code it self so library not need to be installed. Which can be done since this plugin will be open source anyhow.
Raspberry Pi 5 is a different beast. 99% it wont work. Make sure to test on Pi 5.
And it would be great if there was a xojo stable gpio plugin that works always.
It should work after all its libgpiod the one you pointed out. So I cannot see why it would not work.
Its made for RP 5 after all.
I don’t have 5 though am trying to cure my self of the addiction, until recently I had almost every single model from all makers. So trying really hard to not get the 5 now !.