I have a PHP code snippet written on a slightly older Raspberry Pi 4 and want to run it on a Raspberry Pi 5 with 8GB of RAM.
Of course, I've downloaded and installed the latest software.
It runs and the data is displayed. However, my additional application no longer works.
This application reads and writes input and output data from the code snippet. Previously, I used the PHP command:
`$fp = fopen("sys/class//gpio/gpio4/value","r");
$Var= fread($fp,1) + 0
fclose($fp)`
to read a range
, or `
shell_exec("echo $pin1 >/sys/class/gpio/gpio2/value");`.
Does anyone know the current programming commands to read and write GPIO?
How to read GPIO data from a PHP file?
Moderator: Ulrich
Forumsregeln
Bitte nur Hardware posten, die man selber auch ausprobiert bzw. in Verwendung hat.
Bitte nur Hardware posten, die man selber auch ausprobiert bzw. in Verwendung hat.
-
annabellerice
- Beiträge: 1
- Registriert: Do 29. Jan 2026, 03:13
Wer ist online?
Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste