domingo, 12 de abril de 2015

Web server

With this practice the aim is to make a web server with Arduino, with a mandate to give data from a temperature sensor.
With this system we can check the status of temperature of a place through internet.
This requires having an Arduino Uno, an Ethernet shield, and a temperature sensor LM35.
The connection is simple we connect the Arduino with the shield , also free analog pins will have to enter the temperature sensor.
The chosen temperature sensor is LM35 which is built into the shield of MSE.
image 
As a shield for the given pin is the analog sensor 4 or A4 , as shown in Sketch.


Therefore the assembly and would be shown in the image.
clip_image001
Down the Arduino Uno is observed over the Ethernet shield , and followed it should go the MSE, being a shield of Integrated Center, and more expensive, you can choose from that I put in the picture is the DS18B20.
clip_image002
The difference is that the former does not need library, and second whether the Texas Instuments to operate by the SPI protocol.
Once compound system , now it's shaping our router , so we must go to "MS -DOS " introduce cmd in the search box win8 or XP Run.
We introduce ipconfig / all for our address of the router to configure it.
clip_image003
In the area where it says default gateway , see the direction that most often 192.168.1.1 but would have to look at each router.
We enter this address in the browser and configure the router.
clip_image004
We introduce the username and password we provided by the manufacturer or supplier.
Once inside we have to look ports, or open ports in my case is in the tab Firewall / Redir Port.
clip_image005
Once inside we add one , in this case we will open the 8081, and we will give a fixed IP is 192.168.1.120
clip_image006
And it is added in this case in my router so.
clip_image007
Well once seen the procedure , we go to Sketch.
clip_image008
We include the SPI and Ethernet libraries are for the Ethernet shield work.
MAC determine the shield , but it must be on the back thereof.
The IP address to determine the router.
We open the port on the router.
the pin where our sensor is connected and the variables for proper operation.
clip_image009
Start the server and print the serial IP .
The Sketch is observed as a connection and html server protocol and is performed.
It is also observed as the conditioning performed if more than 25 ° or is lower than display.
clip_image010clip_image011clip_image012
Sketch Once loaded, we go to the browser and enter our shocket (address port) 192.168.1.120:8081 and this image is observed.
clip_image013
clip_image014

To download the files from all the practice you must click on the picture below.


































No hay comentarios:

Publicar un comentario en la entrada