http://esp8266basic.com
A BASIC interpreter for your ESP
Working now on Autodrop3d. A 3d printer with automatic part ejection system. https://autodrop3d.com
Explore... Chat... Share...
Moderator: Mmiscool
sensors.requestTemperatures();
else if ( fname == F("temp") && num_args > 0 ) {
// function temp(sensor #)
// set return value
if(sensors.getAddress(tempDeviceAddress, args[0])) {
if( args[1] >= 9 && args[1] <= 12 ) { // optional argument to set resolution of DS18B20
sensors.setResolution(tempDeviceAddress, args[1]);
}
sensors.requestTemperatures();
*value = sensors.getTempC(tempDeviceAddress);
//sensors.getTempCByIndex(args[0]);
return PARSER_TRUE;
}
else
{
*value_str = "NO SENSOR";
return PARSER_STRING;
}
}
if ( Param0 == "temp" | Param0 == "ti")
{
valParam1 = GetMeThatVar(Param1).toInt();
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
sensors.requestTemperatures(); // Send the command to get temperatures
SetMeThatVar(Param2, String(sensors.getTempCByIndex(valParam1)), PARSER_STRING);
return;
}
if ( Param0 == "temp" | Param0 == "ti")
{
valParam1 = GetMeThatVar(Param1).toInt();
valParam3 = GetMeThatVar(Param3).toInt();
if(sensors.getAddress(tempDeviceAddress, valParam1)) {
if( valParam3 >= 9 && valParam3 <= 12 ) { //option resolution setting for DS18B20
sensors.setResolution(tempDeviceAddress, valParam3);
}
sensors.requestTemperatures();
SetMeThatVar(Param2, String(sensors.getTempC(tempDeviceAddress)), PARSER_STRING);
}
else
{
SetMeThatVar(Param2, String(F("NO SENSOR")), PARSER_STRING);
}
return;
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]