-
Notifications
You must be signed in to change notification settings - Fork 500
Closed
Description
The pinnout is right, and the sensor is responding properly when using 3.9.0, but, with 4.0.1 it's not working.
Code
this is my code:
#include "DallasTemperature.h"
#include "OneWire.h"
#define TEMP_PIN 32
OneWire oneWire(TEMP_PIN);
DallasTemperature sensors(&oneWire);
DeviceAddress endereco_temp;
void getTemperature() {
sensors.requestTemperatures();
Serial.print("Temperatura = ");
Serial.println(sensors.getTempC(endereco_temp), 2);
if (!sensors.getAddress(endereco_temp, 0)) {
Serial.println("SENSOR NAO CONECTADO");
} else {
Serial.print("Temperatura = ");
Serial.println(sensors.getTempC(endereco_temp), 1);
}
data.temperature = sensors.getTempC(endereco_temp);
}When using 3.0.1
Screencast.from.2025-01-20.11-35-35.mp4
when using 4.0.1
Screencast.from.2025-01-20.11-38-17.mp4
Ps: I didn't post the pinnout because its caotic...
milesburton
Metadata
Metadata
Assignees
Labels
No labels

