I want to make a mouse USB HID with a board ESP32S3 DevKitC1
My problem is that the UART port is mandatory to start the mouse with the USB port
.
Once the mouse is started I can unplug the UART cable and the mouse works with the USB cable only.
If I plug USB cable only my mouse not work
I want that my mouse starts and works with the USB cable only.
What is the problem?
My board is ESP32S3 DevKitC1
My arduino IDE configuration:
my code
#ifndef ARDUINO_USB_MODE
#error This ESP32 SoC has no Native USB interface
#elif ARDUINO_USB_MODE == 1
#warning This sketch should be used when USB is in OTG mode
void setup() {}
void loop() {}
#else
#include <Arduino.h>
#include "USB.h"
#include "USBHIDMouse.h"
USBHIDMouse Mouse;
void setup() {
// initialize the buttons' inputs:
// initialize mouse control:
Mouse.begin();
USB.productName("TEST_USB_HID") ;
Serial.println("TEST_USB_HID");
USB.manufacturerName("LR_TECHNOLOGIES");
Serial.println("LR_TECHNOLOGIES");
USB.begin();
}
void loop() {
Mouse.move(1, 1, 0);
// a delay so the mouse doesn't move too fast:
delay(10);
}
#endif /* ARDUINO_USB_MODE */