Raspberry Pi GPIO LED Control via PHP
Budget: €8 – €30 EUR
I am in need of a capable developer to design a PHP web page that allows me to control the GPIO pins of a board like Raspberry Pi. This web page should be able to read and write GPIO
the board is
https://wiki.radxa.com/Zero/hardware/gpio
i created a .py file and try to call the .py file from the .php file
the .py can't create the GPIO
i try with
sysfs_handle = open("/sys/class/gpio/export", "w", 423)
if (sysfs_handle):
sysfs_handle.write("423")
print("GPIO 40 pin 423 opened for EXPORT")
else:
print("Can't open gpio/export. Something went wrong. Are you root?")
sysfs_handle = open("/sys/class/gpio/gpio423/direction", "w")
the first command works (return GPIO 40 pin 423 opened for EXPORT) but when open the file return "the file does not exists"
To be sure you read all this requirement, when replay, starts with "Hi Andrea, ...."
Thanks
the board is
https://wiki.radxa.com/Zero/hardware/gpio
i created a .py file and try to call the .py file from the .php file
the .py can't create the GPIO
i try with
sysfs_handle = open("/sys/class/gpio/export", "w", 423)
if (sysfs_handle):
sysfs_handle.write("423")
print("GPIO 40 pin 423 opened for EXPORT")
else:
print("Can't open gpio/export. Something went wrong. Are you root?")
sysfs_handle = open("/sys/class/gpio/gpio423/direction", "w")
the first command works (return GPIO 40 pin 423 opened for EXPORT) but when open the file return "the file does not exists"
To be sure you read all this requirement, when replay, starts with "Hi Andrea, ...."
Thanks