Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Raspberry Pi / GPIO not working with AGK in Raspi4B Bullseye

Author
Message
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 10th Feb 2023 15:54
Hi,
Nowadays I use almost only AppGameKit studio, unless I develop something for the Raspberry Pi.
It has been like 3 years since I didn't modify my Raspi applications, using AppGameKit for GPIO input and the quick and easy Tier 1 development. It runs great compiling and running on a Raspi 3B+ , Jesse. Decided to do it now on the on a raspberry Pi 4B, Bullseye, but the player didn't work, so I managed to compile PiPlayer by following the instructions on the "How to get AppGameKit working..." thread. Thanks for the great advise.
Everything else that I use seems to work, except the GPIO commands.
The error codes in terminal (Sometimes I open AppGameKit on terminal, sudo or not sudo fails the same), indicate that the files referred by the commands don't exist.
Neither OpenToWrite or OpenToRead commands accept an ID reference parameter, so it is only the "gpio:xx" parameter in both.

As for the connection or Raspberry correct working, I can confirm that I can activate LEDs and have input read from the same GPIO pins by using python, Lazarus, or directly in Terminal using the wiringPi "gpio" command or with the built-in raspi-gpio command. I still have to try using mono and Xojo apps, or c (just c, not with AGK), but I bet they will work.

My next step is to dig into the local git clone, but perhaps someone has an insight on how to approach this. Maybe someone has experienced this issue.

AGK Version I tested is 2023-01-26, with the compiled PiPlayer from the mentioned instructions.
Also will try to compile in the raspi 3b+ and then copy the resulting executable and files to the 4B and see how this works.


May the 3d force B with U
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 14th Feb 2023 15:42
By going through the code I see that it is possible that the Core source file being compiled is the Linux Core, not the Pi Core, that is why the executable does not parse the file name, failing to determine that "gpio:" is not actually a file but a special sequence of shell commands to get or set the GPIO bits via "device files".
I tested my same agk source, this time on a Raspi 3B+, with AppGameKit May 2017 and it still works, Also found that the repositories for Jessie are now archived and there is a bit of legwork to do for having updates or download new things, but that AppGameKit still works there.
Next step will be to copy the project to VS on windows or mac (maybe not.. xcode is not of my liking) and learn the project structure in order to find where to change the make file to use the pi core.

Of course if someone knows a shortcut, it is well appreciated.
May the 3d force B with U

Login to post a reply

Server time is: 2024-04-26 15:39:46
Your offset time is: 2024-04-26 15:39:46