Dear Friends,
First I request apologizes about my English, but it is not my native language.
Those days I'm playing around with an arduino yun, trying to develop a remote heating control. This involves a sketch in the arduino side, a php script to interact with an sqlite database on the linino side, and an external Java application that can access the arduino yun webservices and the webservices implemented with the php scripts.
All is working very well, but sometimes I have thoughts and reflections about the sketch vs php. Actually my sketch is finished, but it takes 90% of the 32kb arduino memory and 50% of the 2Kb ram memory. It runs very well now but I had to optimize it as much as possible to fit in the arduino. I'm not saying that I'm a C master, I'm sure that the sketch can be more optimized to take less space...
But I was thinking that in the linino side I have more ram available, and more space for programs (I've an sd card with 2Gb). Then the question is, why not develop all the functionalities only in php or phyton? With the rest webservices from the arduino yun, you can interact with the different sensors or relays that may be connected to the board. If real time access to the sensors or realys is not an requirement, I think that I can replace all the sketch functionalities with php and the arduino yun webservices.
And in a php script you can have more power and flexibility to program as in a sketch...
What do you thing about these questions?
Best regards.
R. Campos