Esp32 + ds18b20

Hello friends, greetings in Brazil, I’m a beginner at IOT, but I’ve managed to do some things, like connecting the ESP32 and a DHT sensor, but now I would like to do a project with the DS18B20 sensor, but I can’t design a good code to compile , an error appears at the end of the code:

void loop () {
thing.handle ();
} ===============> unterminated argument list invoking macro “outputValue”


#ifdef ESP32
#include <ThingerESP32.h>
#else
#include <ThingerESP8266.h>
#endif
#include <SPI.h>
#include <ThingerWifi.h>

#include <OneWire.h>
#include<DallasTemperature.h> 
#define ONE_WIRE_BUS 2 // DS18B20 on arduino pin2 corresponds to D4 on physical board

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature DS18B20(&oneWire);

#define USERNAME "   "
#define DEVICE_ID "   "
#define DEVICE_CREDENTIAL "   "

#define SSID "    "
#define SSID_PASSWORD "     "

ThingerWifi thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup() {



  /* Inicia conexao com o thinger.io */   

  thing.add_wifi(SSID, SSID_PASSWORD);



  /* Inicia o funcionamento do sensor de temperatura e umidade. */

  DS18B20.begin();  



  /* Envia a temperatura */

  thing["Temperatura"] >> outputValue(DS18B20.requestTemperatures();

}


void loop() {
  thing.handle();
}

you should read the documentation of dallasTemperature.h library, or at least take care with the integration. You are calling requestTemperatures() which will only request data to all dallas sensors but won’t return the data. After that it’s need to call getTempCBindex()You have to use something like:

thing["temperatura"]>>[](pson & out){
  sensors.requestTemperatures(); 
  out=sensors.getTempCByIndex(0);
}

hope it helps