Here is my code which is pretty standard copied almost as is from somewhere. I am using an ENC28J60 module to give my arduino nano network access.
The code hosts a simple webpage with 2 buttons, on and off. It works fine to turn on and off my LED. I have a few issues though:
- The web page works fine from a PC, but not from an iOS device. The page won’t load at all.
- If I click on any button repeatedly before the previous operation finishes, the arduino gets stuck and has to be reset/rebooted.
It would be nice to know how to fix those issues, but even after I would prefer to have my raspberry pi host a php page where I would have several arduinos listed in different parts of the house to control different things.
So I know how to send data from arduino to a website like thingspeak, so I can send the data to my raspberry pi 3 the same way, but i want to do the opposite. Rather than having the raspberry pi overloaded with web requests from multiple devices, I want it to contact the arduino only when i ask it to. So on my php page when I click button X, it calls the appropriate arduino to turn device X on or off.
How can I do that? I need a starting point.