Hello,
I am trying to make a project where one slave ESP32 sends joystick data to a master ESP32 device (XIAO ESP32S3 clone) which in turn is supposed to act as a HID device converting the joystick data to corresponding keystrokes on a mac computer. I had tested its OTG functionality and it was working. However, regardless of which platform I program it now (Arduino IDE, PlatformIO) it doesn't go into OTG mode as it still appears as one of the serial ports on Arduino IDE and doesn't write anything on the computer. So currently I am trying to get the code below to work so I can adjust it step by step without encountering the same issue.
Any help is much appreciated!
#include "USB.h"
#include "USBHIDKeyboard.h"
USBHIDKeyboard Keyboard;
void setup() {
USB.begin();
Keyboard.begin();
delay(1000);
}
void loop() {
Keyboard.println("Hello, World!");
delay(2000);
}