I have reinstalled the UF2 firmware by dragging it to the QTPYS3BOOT, and using esp-tool.py I have also performed the factory reset described here: https://learn.adafruit.com/adafruit-qt- ... tory-reset but the problem persists. I chalked it up to the board being damaged and loaded the same FunctionalInterrupt example sketch onto a brand new, never used ESP32-S3 and the exact same problem is occurring. Nothing connected to the GPIO pads Tried 2 different USB-C cables.
There's gotta be a way to fix this, right? I didn't just immediately brick 2 boards I hope!
Here's the example code I loaded onto the board:
Code: Select all
#include <Arduino.h>
#include <FunctionalInterrupt.h>
#define BUTTON1 16
#define BUTTON2 17
class Button
{
public:
Button(uint8_t reqPin) : PIN(reqPin){
pinMode(PIN, INPUT_PULLUP);
attachInterrupt(PIN, std::bind(&Button::isr,this), FALLING);
};
~Button() {
detachInterrupt(PIN);
}
void ARDUINO_ISR_ATTR isr() {
numberKeyPresses += 1;
pressed = true;
}
void checkPressed() {
if (pressed) {
Serial.printf("Button on pin %u has been pressed %u times\n", PIN, numberKeyPresses);
pressed = false;
}
}
private:
const uint8_t PIN;
volatile uint32_t numberKeyPresses;
volatile bool pressed;
};
Button button1(BUTTON1);
Button button2(BUTTON2);
void setup() {
Serial.begin(115200);
}
void loop() {
button1.checkPressed();
button2.checkPressed();
}