RamiDuino:
Hi everybody!!!
I got one question for you all guys. I am relatively experienced with HTML and PHP what makes me to think in these 2 languages while programming web sites. But this time I wanted to create web server using an Arduino Uno + Ethernet Shield. The point is that Arduino isn't Windows = )
Does anyone know how to be able to install PHP onto Arduino UNO + Ethernet Shield?
Thank you very much !!!
Greetings everybody !!!
I will save you the trouble. Just get a Raspberry PI, and use your Arduino in conjunction with it. Forget about using PHP in Arduino, it's not gonna happen, I wouldn't even recommend Arduino for with heavy web processing tasks.
I was running a room automation sketch with the Arduino Mega. Despite having only 8KB of ram, it is actually quite capable, and I was surprised how much I was able to get it to do. But it's just an accident waiting to happen, especially when you plan on expanding the code.
I managed to get it to serve a html with java script interface webpage, with auto update status of the switches, including login screen with cookie support. It also had to process http get and post requests. In addition, it was also processing a lot of other info from my rain, light, temp, motion sensors, motor controllers, relays, pwm outputs, analog inputs, logging sensor/switch to SD card and more. Of course it finally crashed one day as I was pushing my luck by adding new code, the ram simply wasn't built to handle this.
I finally decided to move the bulk of the web server code to a Raspberry PI, and I didn't look back since. I have had no crashes since then, running my PI, Mega and a bunch of ESP8266s 24/7. They communicate via LAN. I had to almost start from scratch to re-code everything, but the results were worth it. I also learnt a lot through the process. Using PHP and mySQL has also made my web code much easier to maintain.
I have also learnt a lot trying to fit so much into the Mega, so it wasn't in vain. I learnt how to use progmem, using the proper data type for your needs, and so much more although it wasn't all a walk in a park. If you really want to use PHP with Arduino, like I said, go with the Raspberry PI and Arduino combo, can't go wrong.