Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Arduino source code for ESP32 internal temperature sensor and hall sensor
void setup() {
Serial.begin(115200);
}
void loop() {
int measurement = 0;
measurement = hallRead();
Serial.print("Hall sensor measurement: ");
Serial.println(measurement);
delay(1000);
}
#ifdef __cplusplus
extern "C" {
#endif
uint8_t temprature_sens_read();
#ifdef __cplusplus
}
#endif
uint8_t temprature_sens_read();
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.print("Temperature: ");
// Convert raw temperature in F to Celsius degrees
Serial.print((temprature_sens_read() - 32) / 1.8);
Serial.println(" C");
delay(5000);
}
@maaami98

This comment has been minimized.

Copy link

@maaami98 maaami98 commented Jun 26, 2020

but only 53.33 C writes

@LDavidFr

This comment has been minimized.

Copy link

@LDavidFr LDavidFr commented Sep 19, 2020

but only 53.33 C writes

Same here. the function returns 128, sensor not present ?!

@ankitsynx

This comment has been minimized.

Copy link

@ankitsynx ankitsynx commented Nov 18, 2020

yes, this value is returned when the sensor is absent. Heard it's discontinued on newer ESP32s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.