diff --git a/libraries/ESP32/examples/HallSensor/HallSensor.ino b/libraries/ESP32/examples/HallSensor/HallSensor.ino new file mode 100644 index 00000000000..3db5951d4d8 --- /dev/null +++ b/libraries/ESP32/examples/HallSensor/HallSensor.ino @@ -0,0 +1,16 @@ +//Simple sketch to access the internal hall effect detector on the esp32. +//values can be quite low. +//Brian Degger / @sctv + +int val = 0; +void setup() { + Serial.begin(9600); + } + +void loop() { + // put your main code here, to run repeatedly: + val = hallRead(); + // print the results to the serial monitor: + //Serial.print("sensor = "); + Serial.println(val);//to graph +}