Post about your Basic project here

Moderator: Mmiscool

User avatar
By Mmiscool
#34737 Well like with the wifi commands
connect and ap.

The settings can be changed on the settings page. They can also be set by the command. When the command is set it writes to a settings file which is the same one used for the settings page so if changed with the command it sticks.
User avatar
By Mmiscool
#34743 1 wire devices in latest build with work with pin 2. One wire devices will not work on pin 5 any more. to make compatible with one wire usage on esp-01.

i2c is still mapped to these pins but they should not interfere with each other theoretically.

Thanks to Rotohammer for proving out and making the changes that there would not be a problem and there would not be a problem.
User avatar
By heckler
#35091 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
User avatar
By zopper
#38668 Thanks for this feature.

I have a question, though. When using multiple probes, how can I know which is which? When I connect DS18b20 to Raspberry Pi, the probes can be found under their ID, something like 28-00000xxxx. Is there a way how to find this ID? Is this how the "temp {Device ID} {Variable name to place data in to}" works, that I should put the 28-xxxx as Device ID? In the example I found, only 0 is used as ID...