Best approach Raspberry Pi 5?

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.

Any suggestions would be welcome.

Kind regards,


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.

Thanks Derk, for now I’d be ok with just gpioset. Where can I see how to get that installed on my Pi 5?

Most likely it’s already installed on the default pi os.

Here is some info:

You need the gpioset full path from the shell class to make it work.

sudo apt install gpiod

I hope @Christian_Schmitz makes a wrapper plugin around this sooner or later :sunny::sunglasses:

I would still use WiringPi (a fork of the old no longer supported one)

GitHub - WiringPi/WiringPi: Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings) - For Raspberry
GitHub - orangepi-xunlong/wiringOP: wiringPi for Orange Pi - For Orange Pi
GitHub - friendlyarm/WiringNP: This is a GPIO access library for NanoPI. It is based on the WiringOP for Orange PI which is based on original WiringPi for Raspberry Pi. - For Nano Pi
GitHub - khadas/WiringPi: WiringPi for Khadas boards - For Khadas boards.

Reason I stick with Wiring PI is largely to be portable, then it just works on most of the 3rd party boards also.

That is NOT supported on the Pi 5 !

Targetting the native library will give stability in the future. You can use declares into libgpiod (not pigpiod, thats a differen, unsupported lib).

I recommend plugin developers to develop a plugin to the libgpiod native linux gpio library.

I do not recommend any onther library to the pi 5 now.

Using the shell class is the easiest way for now but declares are possible.

More info here:

Hmmm are we sure its not ?

This is not the old WiringPi that Gordon got grumpy with and quit ts a Fork made to support newer models.

(Edit, I see in its description now that their having problems getting people to show interest to upgrade it, so your right there)

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.

1 Like

what is it that you want to do?

  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
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.

1 Like

Currently, I only need to be able to set a port to output and switch it on and off.

1 Like

That looks promising, I will try this.

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 !.

Oh i see you have used the libgpiod. That’s nice, yes it should work then as it’s installed by default.

Dont even need the installed one, its not linking against it at all. Since the plugin encapsulates it instead of linking against.

1 Like

I have posted first test at

(on the repo text bellow the picture you will find link to the built plugin)

Plugin does not do everything yet, but it can do the first 3 official example projects from libgpiod.

Included with the plugin are the 3 example projects.

It would be great if someone would test them on RP5. (and maybe on something else). I have ran them on RP4 - 64 bit.

(Screenshot from one of the example projects)

The strategy is to then pile more onto it to let it be able to do more of the libgpiod example projects.

1 Like

I’d love to test on a Pi5, but where can I find the built plugin? I don’t see it.

There is link at bottom of the page bellow the picture there. “Downloading the plugin”

I will build 2nd version in the week also which (right now passes 3 more official example projects, probably more by the time I build it).

1 Like

The Get Chip info example app works: it reports 32 lines