March 2017
Intermediate to advanced
732 pages
15h 24m
English
Having the possibility to manage the GPIO lines in a scripting language in an easy manner allows us to have a powerful tool to speed up simple tasks involving these peripherals. That's why in this section, we're going to see how the GPIO lines can be managed in both PHP and Python scripting languages in a manner similar to what we did in C.
However, in order to keep the code simple, we suppose that the GPIO lines gpio24 and gpio91 have been exported in some way already. For example, we can properly set them up with the following well-known commands:
root@wb:~# echo 24 > /sys/class/gpio/export root@wb:~# echo in > /sys/class/gpio/gpio24/direction root@wb:~# echo falling > /sys/class/gpio/gpio24/edge root@wb:~# ...
Read now
Unlock full access