ESP32-S2 as USB keyboard

Viewed 3844

I need help to understand how I can emulate a keyboard using the ESP32-S2. I'm new with this device. I'm able to compile this example.

The problem that I have is that I found a lot of examples for Arduino: these examples import these libraries:

#include "Arduino.h"
#include "hidkeyboard.h"

But in the Espressif esp-idf these libraries are not available.

So, how can I use this code in order to be compiled by esp-idf? Thanks.

1 Answers

Probably moderators didn't understand my answer and deleted my previous answer, so I will try to answer one more time.

You can't use that library with esp-idf as it was designed to work with Arduino only on ESP32-S2. There is an example how to use older versions of this library with esp-idf as Arduino as a component.

To moderators: my intention was not to promote myself when I posted a link to a Github repository, but I wanted to show how to use the library requested in the question with that particular hardware, also requested in the question.

Related