In this post, using a temperature sensor DS18S20 and an Arduino Ethernet Shield, we will build a thermometer that can be read in the local network, and that will show the current temperature and the maximum and minimum temperature.
First, we need to have the library ‘One Wire’ in Arduino which is necessary to use the sensor. You can download it here. You can find some help here for installing it, in case you need.
We will need a 4.7kΩ resistor for the DS18S20 connection. The way to connect it, is shown in the following image.
The code we will use is the following one:
After the code is loaded in Arduino, a web, like the one in the image, will be shown when we enter the IP of the Ethernet Shield.


Hola. Queria preguntarte si sabes si es posible agregar mas de 1 sensor DS18S20. Es porque quiero utilizar Arduino para monitorizar la temperatura de un datacenter en varios puntos. Desde ya muchas gracias.
Si, es posible usar varios sensores a la vez ya que ésta librería permite que cada sensor tenga un código único que los identifique. Para ello habría que modificar el código para que tome lecturas del número de sensores deseados y que posteriormente muestre sus lecturas.
me salen estos errores favor necesito ayuda
ReadWrite:25: error: ‘OneWire’ does not name a type
ReadWrite.ino: In function ‘float getTemp()’:
ReadWrite:122: error: ‘ds’ was not declared in this scope
ReadWrite:128: error: ‘OneWire’ has not been declared
ReadWrite:138: error: ‘ds’ was not declared in this scope
Tu error se debe a un problema al importar la librería OneWire. Revisa que estás importando bien la librería http://www.arduino.cc/es/Hacking/Libraries
me sale este error
sketch_may02a.cpp: In function ‘void setup()’:
sketch_may02a:32: error: no match for ‘operator!’ in ‘!Serial’
sketch_may02a.cpp:37: note: candidates are: operator!(bool)