I can't seem to get a simple switch working using the internal pull-up resistor on the DFR0575 Beetle ESP32. The following code always outputs HIGH whether the button is pressed or not:
`voidsetup() {
Serial.begin(9600);
pinMode(4,INPUT_PULLUP);
}
voidloop() {
Serial.println(digitalRead(4));
delay(500);
}`
2023-05-26 11:43:14
We've done pin mapping for the Beetle-ESP32. In your code, you need to write D4. For example: