Hello everyone.I'm sorry if I'm in the wrong section of the forum but i'm new here and i'm new in Arduino's world too.
I'm a programmer with decent knowledge of electronics and so I decided to try my hand in the creation of this project.
I still have not made ??purchases of sensors or other, but I limited myself to buy the Arduino board to begin to take confidence with the YUN board.
The aim of my project is to create a circuit connected to Yun , battery-powered and comes in a waterproof box to be able to accommodate even the open air so that it can collect data from the environment .
These data must then be sent to an Apache Web server and stored in a MySQL database.
My problem is not with the circuitry but in the communication between arduino and apache.
I hope someone can give me some tips because , I repeat, I am new to the arduino world Yun and therefore I did not understand how I should do to send a value recorded in a database.
I want to send data from the YUN in some way to a php page then thought we would have to save the data in the database.
My main request is precisely how to send the data to the php page on apache?
I hope I was clear and I hope someone can help me.
The Yun has built in Ethernet, so the process of sending data to an Apache server is EXACTLY the same as on any board with an Ethernet shield. You make a GET request to execute a PHP script, supplying it with the data needed to perform the operation required, after connecting to the correct server.
Can you quote the part from your original post that mentions WiFi?
Have you looked at the WiFi examples? There are client and server examples (you want client) there, too.
The Yun uses a different mechanism (not SPI) to communicate with the Ethernet and WiFi hardware. If you haven't already, I suggest that you spend some time here: http://arduino.cc/en/Guide/ArduinoYun
doesn't work when I paste it in my browser. It does not get a response from the Sbam.php script.
Can you tell why? If not, then network programming is not (yet) for you. You need to start with understanding what localhost means. The Yun IS the localhost, and it doesn't know squat about that script. Clearly, you don't mean localhost, since the Yun isn't serving the page.
cappun:
I can't understand on what ip and port i have to connect the YunClient for sending to my PHP page the HTTP request.
Assuming your client and server are within the same network, the hostname and port that you specify for the server need to match the hostname and port that the server is actually running on.