// Simple sketch to access the internal hall effect detector on the esp32. // values can be quite low. int hall_sensor_value = 0; void setup() { Serial.begin(9600); // initialise the serial communication at 9600 bps } void loop() { hall_sensor_value = hallRead();//read hall effect sensor value //print the results to the serial monitor Serial.print("Hall sensor value = "); Serial.println(hall_sensor_value); delay(500); }