Originally, I just wanted to do a simple test
but I run into trouble
here is my code
#include <OneWire.h>
#include <DallasTemperature.h>>
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup(void)
{
Serial.begin(115200);
Serial.println("Temperature Sensor");
sensors.begin();
}
void loop(void)
{
sensors.requestTemperatures();
Serial.println(sensors.getTempCByIndex(0));
delay(1000);
}
at the DallasTemperature sensors(&oneWire); It appears an error
how can i solve the question
please help me =(