From 839318c0eb319da4e4778056c7f8c08eb0bd925d Mon Sep 17 00:00:00 2001 From: Brian Degger Date: Wed, 21 Jun 2017 13:16:47 +0100 Subject: [PATCH] Create hall_effect_esp32.ino (#450) * Create hall_effect_esp32.ino A simple example to access the hall effect sensor in the esp32 * Create hall_effect.ino * Update hall_effect.ino Simple sketch to access the internal hall effect detector on the esp32 * Delete hall_effect_esp32.ino * Create HallSensor.ino * Update HallSensor.ino * Update HallSensor.ino * Delete hall_effect.ino --- .../ESP32/examples/HallSensor/HallSensor.ino | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 libraries/ESP32/examples/HallSensor/HallSensor.ino diff --git a/libraries/ESP32/examples/HallSensor/HallSensor.ino b/libraries/ESP32/examples/HallSensor/HallSensor.ino new file mode 100644 index 00000000..3db5951d --- /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 +}