Project 3: Internal Sensors
In this article, you will learn how to use the ESP32 touch pins, hall-effect sensor, temperature sensors with Arduino IDE.
Required Hardware and Software
- ESP32 Devkit V1
- Jumper wires
- 330 Ohm Resistor
- 10k Ohm Resistor
- 5mm LED
- Arduino IDE
- First, you need to arrange the hardware like this picture below.
2. Then, open your Arduino IDE. Go File > New. There will be a new sketch. Copy this following code to your Arduino.
3. Click verify and then upload. This code reads the touch value from the pin we’ve defined, and lights up an LED when the value is below the threshold. This means that when you place your finger in the aluminium pad, the LED lights up. This is my video for this project.
For this project, I simply follow the instruction given in this website https://randomnerdtutorials.com/esp32-hall-effect-sensor/. No need for LED or jumper wires. Copy the following code to your Arduino.
Here is my video for the demonstration
Internal Temperature Sensors
For this project, I simply follow the instruction given in this website https://circuits4you.com/2019/01/01/esp32-internal-temperature-sensor-example/. There is no need for LED or jumper wires, all you need is ESP 32. Copy the following code to your Arduino.
It will only detects the internal temperature of ESP32 so I only took the video of the serial monitor to show the temperature. Here is my video for the project.