Welcome to DFRobot: www.DFRobot.com.cn 44 / 49
delay(1000);
}
Please click verify/compile to review and please upload it after the confirmation.
Once you click Upload, IDE will send codes to FireBeetle Board-ESP32.
Once the upload finishes, open the built-in serial monitor of Arduino IDE, touch D9 with your hand
(T2 corresponds to D9) print 1 shown as below.
Code analysis:
Obtaining GPIO state of the capacitance sensors only requiring calling touchRead. The antitype
of touchRead is as below:
uint16_t touchRead(uint8_t pin)
0 means no touch, 1 means touch. From T0 to T9 are pins, the corresponding pins of Firebeetle
shown in the list as below.