With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
That's it. So instead of putting $pin (from 0 to 7) in the exec function, you put $array[ $pin ] (array for 5 to 13)
Try to ask directly for /gpio.php?pic=0 in your browser to see what it gives you. In function of that you should be able to troubleshoot the error: print variables, try separate commands, etc, simply do what a programmer would do.If you want to look for another instructable, you are obviously absolutely free.
At the beginning of the code, create $array = [5,...,13]Then in the system and exec commands, replace $pic by $array[$pic]
Hi!I think I already answered this question in another comment but if I didn't then here's how you can use whatever pins you want:-Use the same code-In gpio.php add an array making the link between numbers 0 to 7 and the pins' number you want to use. For instance [5,6,7,8...,13] if you want to use pins 5 to 13. It doesn't need to be in a particular order. That way, the user still asks for pin 0 which will, due to the array, corresponds to its first element. Here it would be 5.Hope I Helped,TheFreeElectron
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.