Pages: [1]   Go Down
Author Topic: how to output ds18b20 address to arduino webserver and assign sensor name  (Read 950 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe someone have something like the example:
   output temperature sensor DS18B20 address and assign it a name, on the arduino web server for example- room temperature, outdoor temperature ...
I want to all the sensors are connected to a single cable and make configuration through web server. I use enc28j60 controller.
Logged

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe even I can help (first time), I did it this way:
Find out MAC address for each Onewire device and name it:
Code:
DeviceAddress TN = { 0x28, 0x44, 0x33, 0x9D, 0x01, 0x00, 0x00, 0xAA };
DeviceAddress TO = { 0x28, 0x49, 0x45, 0x9D, 0x01, 0x00, 0x00, 0x11 };
DeviceAddress TP = { 0x28, 0xAE, 0x2E, 0x9D, 0x01, 0x00, 0x00, 0xDC };
DeviceAddress TV = { 0x28, 0xB7, 0x22, 0x9D, 0x01, 0x00, 0x00, 0x30 };
DeviceAddress TOUT = { 0x28, 0x3E, 0x3B, 0x9D, 0x01, 0x00, 0x00, 0xC3 };
Set sensor and precision:
Code:
sensors.begin();
  sensors.setResolution(TN, TEMPERATURE_PRECISION);
  sensors.setResolution(TO, TEMPERATURE_PRECISION);
  sensors.setResolution(TP, TEMPERATURE_PRECISION);
  sensors.setResolution(TV, TEMPERATURE_PRECISION);
  sensors.setResolution(TOUT, TEMPERATURE_PRECISION);
Get Temperature reading in HTML code:
Code:
          getTemperature(TOUT);
          client.println(F("<h3><font color='green'>OUTSIDE TEMPERATURE</h3>"));
          client.println(F("Temp &#176;C:"));
          client.print(tempC);
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to do the following:
http://me _arduino
You connect the new sensor with the address 0x00, 0x11, 0x22
Please assign a sensor name ...|_Room_| and press ENTER

I do not know what will be the address of the connected sensor
Logged

Pages: [1]   Go Up
Jump to: