-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error compiling code on esp32-s3 #51
Comments
hi, what board did you select in the arduino ide tools menu? if you know what esp32 pin is connected to the builtin led, you can specify it before including the usb soft host library: // if the onboard led is on pin 2
#define LED_BUILTIN GPIO_NUM_2 |
The board selected on the menu is ESP32-S3-USB-OTG. In file included from /home/mattiacarbone/Arduino/libraries/ESP32-USB-Soft-Host/src/ESP32-USB-Soft-Host.h:5, |
BLINK_GPIO is internal to esp32-usb-soft-host, if you define that one before including the library, don't define LED_BUILTIN do you have an onboard led btw? if not you can try this: #define DP_P0 15 // your USB pin for D+ (edit this)
#define DM_P0 16 // your USB pin for D- (edit this)
#define FORCE_TEMPLATED_NOPS // esp32s3 will work better with this flag
#define BLINK_GPIO -1 // -1 = no onboard led
#include <ESP32-USB-Soft-Host.h>
usb_pins_config_t USB_Pins_Config =
{
DP_P0, DM_P0,
-1, -1,
-1, -1,
-1, -1
};
void setup()
{
Serial.begin(115200);
USH.setActivityBlinker(nullptr); // disable activity led blinking
USH.init(USB_Pins_Config);
} if you still get errors I'll need more info: OS, Arduino IDE version, espressif core version, and the full source of the sketch you're running |
thanks, I'll try to reproduce that and think of a way to prevent those errors. meanwhile you can try to bypass the error by testing the esp32s3 example sketch using |
Thank you! |
USB Soft Host library only sees USB packets, it is up to you to turn those keycodes into keys depending on you keyboard layout. The sample example you compiled is just a HID forwarder, use the USB_Test sample sketch if you want to just print the key codes, and have a look at the M5Stack_Grey_USB_Test code, especially the keyboard parser which is derived from the USB_Host_Shield_2.0 HID example |
Hi,
I was compiling the code on esp32-s3 OTG and I get these errors
how can they be fixed?
In file included from /home/mc/Arduino/libraries/ESP32-USB-Soft-Host/src/ESP32-USB-Soft-Host.h:5,
from /tmp/.arduinoIDE-unsaved2024428-68974-1kyf6pp.qsvb/sketch_may28a/sketch_may28a.ino:13:
/home/mc/Arduino/libraries/ESP32-USB-Soft-Host/src/ESP32-USBSoftHost.hpp:13:24: error: 'LED_BUILTIN' was not declared in this scope
#define BLINK_GPIO LED_BUILTIN
^~~~~~~~~~~
/home/mc/Arduino/libraries/ESP32-USB-Soft-Host/src/ESP32-USBSoftHost.hpp:98:41: note: in expansion of macro 'BLINK_GPIO'
gpio_num_t blink_gpio = (gpio_num_t)BLINK_GPIO;
^~~~~~~~~~
/home/mc/Arduino/libraries/ESP32-USB-Soft-Host/src/ESP32-USBSoftHost.hpp:13:24: note: suggested alternative: 'LED_NUMLOCK'
#define BLINK_GPIO LED_BUILTIN
^~~~~~~~~~~
/home/mc/Arduino/libraries/ESP32-USB-Soft-Host/src/ESP32-USBSoftHost.hpp:98:41: note: in expansion of macro 'BLINK_GPIO'
gpio_num_t blink_gpio = (gpio_num_t)BLINK_GPIO;
^~~~~~~~~~
The text was updated successfully, but these errors were encountered: