Running the example code in Lazarus IDE on a Pi4 (Bullseye 32-bit), the value of gReturnCode is -1
That means it has failed.
Obviously, I don't have the full code (or a sensor) and we are using the deprecated sysfs method (GPIO Sysfs Interface for Userspace) where
- I am not running as root
- I have not exported the GPIO
- I have not set the pin direction
So I expect it to fail.
Running a sudo bash script on the Pi4 using the sysfs method to drive GPIO21 hgh works.
-
That means it has failed.
Obviously, I don't have the full code (or a sensor) and we are using the deprecated sysfs method (GPIO Sysfs Interface for Userspace) where
- I am not running as root
- I have not exported the GPIO
- I have not set the pin direction
So I expect it to fail.
Running a sudo bash script on the Pi4 using the sysfs method to drive GPIO21 hgh works.
-
Statistics: Posted by neilgl — Tue Apr 16, 2024 10:38 pm