Post about your Basic project here

Moderator: Mmiscool

User avatar
By heckler
#38679 Hi Zopper,

The only way I have found to identify the different ds18b20 sensors is to selectively heat or cool them one at a time to see which one shows a change.
A good thing to use is canned air or computer dust off, etc. and turn the can upside down and then gently squeeze the trigger and aim the spay at a given sensor. You will quickly reach below zero on that sensor.

in your code you simply identify the sensors by 0, 1, 2 etc.
like this...

Code: Select alltemp 0 var0
temp 1 var1
temp 2 var2
print var0
print var1
print var2


see the code in this thread...
http://www.esp8266.com/viewtopic.php?f=41&t=7319&p=37380&hilit=dwight#p37380

hope that helps
dwight
User avatar
By zopper
#38886 So I tested it a bit and it seems to keep the indexing always the same for a given combination of probes. So as long as there is no manipulation with them, it works and I can be sure which probe is which. But access to the long unique ID would be still more useful, if you ever get to change it. :-)
User avatar
By forlotto
#40958 viewtopic.php?f=45&t=8132

We have a fella looking for the DHT11/21 Temp/Humidity sensor any luck on helping him out with this?
User avatar
By mmaxx10
#41641
heckler wrote:here is the thermostat program updated to work on the esp8266-01 module
with the ds18b20 connected to GPIO 0 and an LED connected between GPIO 2 and GND

I have also added a conversion from C to F and it displays both.

feel free to use the updated code in place of the WiFi Thermostat code in the examples

dwight

Code: Select allmemclear
SERIALPRINTLN "restart page"
cls
let tf = 0
let curr = 0
let setp = 30
let stat = On
wprint "<head>"
wprint "<meta http-equiv='refresh' content='5;URL=/input?'>"
wprint "</head>"
Print "ESP8266 WiFi Thermostat "
print
Button "Setpoint" [setpt]
textbox setp
wprint "<br><br>"
wprint "Celsius= "
wprint htmlvar(curr)
wprint "<br>"
wprint "Fahrenheit= "
wprint htmlvar(tf)
wprint "<br>"
wprint "Pin 0="
wprint htmlvar(stat)
wprint "<br><br>"
button "Exit" [quit]
timer 4000 [refresh]
wait
[on2]
po 0 1
SERIALPRINTLN "PIN 0 On"
let stat = "On"
Wait
[off2]
po 0 0
SERIALPRINTLN "PIN 0 Off"
let stat = "Off"
Wait
[setpt]
wprint "<head>"
wprint "<meta http-equiv='refresh' content='5;URL=/input?'>"
wprint "</head>"
Wait
[refresh]
temp  0 curr
tf = curr * 9
tf = tf / 5
tf = tf + 32
SERIALPRINTLN curr
SERIALPRINTLN tf
if curr < setp then goto [on2] else goto [off2]
Wait
[quit]
timer 0
wprint "<a href='/'>Menu</a>"
end





Hi, I have a thermostat on esp - 01 connected to the pin 0 DS18B20, and pin 2 relays when the need to restart esp 01 and has not fill the module, but when you disconnect pin 2 and relay so esp 01 thermostat moves and I can connect the relay, does anyone have any solutions .
When the ESP module 01 restarts so I did not have to disconnect vystuní relay on pin 2nd
Thanks mmaxx10