Download Print this page

DFRobot FireBeetle ESP32-E Manual page 31

Advertisement

Member Function
hallRead()
Description: read the value of built-in hall sensor Return: return integer 0-255; Positive number for North pole; Negative number for South
pole. The stronger the magnetic field, the greater the absolute value
7.5 Compacitive Keys
ESP32 provides the function of capacitive touch sensor. There are 9 touch sensors (T0, T2 ~ T9)available, corresponding to pins 4, 2, 15, 13, 12,
14, 27, 33 and 32 respectively. There is no need to set PinMode. The return value of touchRead() is within 0 ~ 255. The greater the touch force,
the smaller the return value. Burning this sample code into your board, use the pin 4/D12 as the touch key, the touch value will be returned
through the serial port monitor.
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.printf("touch:%d\n",touchRead(4));
}
Result

Advertisement

loading
Need help?

Need help?

Do you have a question about the FireBeetle ESP32-E and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for DFRobot FireBeetle ESP32-E

This manual is also suitable for:

Dfr0654