ESP32 S3 HID SUPPORT
Posted: Wed Dec 18, 2024 1:41 am
Hello everyone
This is my first post on this forum. I have a problem with ESP32 S3 WROOM, namely I cannot run HID support via the USB C port with USB signature. I uploaded the following program into the Arduino IDE
#include <Joystick_ESP32S2.h>
// Create the Joystick
Joystick_ Joystick;
// Constant that maps the physical pin to the joystick button.
const int pinToButtonMap = 9;
void setup() {
// Initialize Button Pins
pinMode(pinToButtonMap, INPUT_PULLUP);
// Initialize Joystick Library
Joystick.begin();
}
// Last state of the button
int lastButtonState = 0;
void loop() {
// Read pin values
int currentButtonState = !digitalRead(pinToButtonMap);
if (currentButtonState != lastButtonState)
{
Joystick.setButton(0, currentButtonState);
lastButtonState = currentButtonState;
}
delay(50);
}
and continued without any changes. The only thing I managed to do was activate the BLE Joystick support, but HID via cable does not work for unknown reasons. Please help me quickly.
This is my first post on this forum. I have a problem with ESP32 S3 WROOM, namely I cannot run HID support via the USB C port with USB signature. I uploaded the following program into the Arduino IDE
#include <Joystick_ESP32S2.h>
// Create the Joystick
Joystick_ Joystick;
// Constant that maps the physical pin to the joystick button.
const int pinToButtonMap = 9;
void setup() {
// Initialize Button Pins
pinMode(pinToButtonMap, INPUT_PULLUP);
// Initialize Joystick Library
Joystick.begin();
}
// Last state of the button
int lastButtonState = 0;
void loop() {
// Read pin values
int currentButtonState = !digitalRead(pinToButtonMap);
if (currentButtonState != lastButtonState)
{
Joystick.setButton(0, currentButtonState);
lastButtonState = currentButtonState;
}
delay(50);
}
and continued without any changes. The only thing I managed to do was activate the BLE Joystick support, but HID via cable does not work for unknown reasons. Please help me quickly.