Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)

Overview

ESP32 BLE Keyboard library

This library allows you to make the ESP32 act as a Bluetooth Keyboard and control what it does.
You might also be interested in:

Features

  • Send key strokes
  • Send text
  • Press/release individual keys
  • Media keys are supported
  • Read Numlock/Capslock/Scrolllock state
  • Set battery level (basically works, but doesn't show up in Android's status bar)
  • Compatible with Android
  • Compatible with Windows
  • Compatible with Linux
  • Compatible with MacOS X (not stable, some people have issues, doesn't work with old devices)
  • Compatible with iOS (not stable, some people have issues, doesn't work with old devices)

Installation

Example

/**
 * This example turns the ESP32 into a Bluetooth LE keyboard that writes the words, presses Enter, presses a media key and then Ctrl+Alt+Delete
 */
#include <BleKeyboard.h>

BleKeyboard bleKeyboard;

void setup() {
  Serial.begin(115200);
  Serial.println("Starting BLE work!");
  bleKeyboard.begin();
}

void loop() {
  if(bleKeyboard.isConnected()) {
    Serial.println("Sending 'Hello world'...");
    bleKeyboard.print("Hello world");

    delay(1000);

    Serial.println("Sending Enter key...");
    bleKeyboard.write(KEY_RETURN);

    delay(1000);

    Serial.println("Sending Play/Pause media key...");
    bleKeyboard.write(KEY_MEDIA_PLAY_PAUSE);

    delay(1000);
    
   //
   // Below is an example of pressing multiple keyboard modifiers 
   // which by default is commented out. 
   // 
   /* Serial.println("Sending Ctrl+Alt+Delete...");
    bleKeyboard.press(KEY_LEFT_CTRL);
    bleKeyboard.press(KEY_LEFT_ALT);
    bleKeyboard.press(KEY_DELETE);
    delay(100);
    bleKeyboard.releaseAll();
    */

  }
  Serial.println("Waiting 5 seconds...");
  delay(5000);
}

API docs

The BleKeyboard interface is almost identical to the Keyboard Interface, so you can use documentation right here: https://www.arduino.cc/reference/en/language/functions/usb/keyboard/

Just remember that you have to use bleKeyboard instead of just Keyboard and you need these two lines at the top of your script:

#include <BleKeyboard.h>
BleKeyboard bleKeyboard;

In addition to that you can send media keys (which is not possible with the USB keyboard library). Supported are the following:

  • KEY_MEDIA_NEXT_TRACK
  • KEY_MEDIA_PREVIOUS_TRACK
  • KEY_MEDIA_STOP
  • KEY_MEDIA_PLAY_PAUSE
  • KEY_MEDIA_MUTE
  • KEY_MEDIA_VOLUME_UP
  • KEY_MEDIA_VOLUME_DOWN
  • KEY_MEDIA_WWW_HOME
  • KEY_MEDIA_LOCAL_MACHINE_BROWSER // Opens "My Computer" on Windows
  • KEY_MEDIA_CALCULATOR
  • KEY_MEDIA_WWW_BOOKMARKS
  • KEY_MEDIA_WWW_SEARCH
  • KEY_MEDIA_WWW_STOP
  • KEY_MEDIA_WWW_BACK
  • KEY_MEDIA_CONSUMER_CONTROL_CONFIGURATION // Media Selection
  • KEY_MEDIA_EMAIL_READER

There is also Bluetooth specific information that you can set (optional): Instead of BleKeyboard bleKeyboard; you can do BleKeyboard bleKeyboard("Bluetooth Device Name", "Bluetooth Device Manufacturer", 100);. (Max lenght is 15 characters, anything beyond that will be truncated.)
The third parameter is the initial battery level of your device. To adjust the battery level later on you can simply call e.g. bleKeyboard.setBatteryLevel(50) (set battery level to 50%).
By default the battery level will be set to 100%, the device name will be ESP32 Bluetooth Keyboard and the manufacturer will be Espressif.
There is also a setDelay method to set a delay between each key event. E.g. bleKeyboard.setDelay(10) (10 milliseconds). The default is 8.
This feature is meant to compensate for some applications and devices that can't handle fast input and will skip letters if too many keys are sent in a small time frame.

NimBLE-Mode

The NimBLE mode enables a significant saving of RAM and FLASH memory.

Comparison (SendKeyStrokes.ino at compile-time)

Standard

RAM:   [=         ]   9.3% (used 30548 bytes from 327680 bytes)
Flash: [========  ]  75.8% (used 994120 bytes from 1310720 bytes)

NimBLE mode

RAM:   [=         ]   8.3% (used 27180 bytes from 327680 bytes)
Flash: [====      ]  44.2% (used 579158 bytes from 1310720 bytes)

Comparison (SendKeyStrokes.ino at run-time)

Standard NimBLE mode difference
ESP.getHeapSize() 296.804 321.252 + 24.448
ESP.getFreeHeap() 143.572 260.764 + 117.192
ESP.getSketchSize() 994.224 579.264 - 414.960

How to activate NimBLE mode?

ArduinoIDE:

Uncomment the first line in BleKeyboard.h

#define USE_NIMBLE

PlatformIO:

Change your platformio.ini to the following settings

lib_deps = 
  NimBLE-Arduino

build_flags = 
  -D USE_NIMBLE

Credits

Credits to chegewara and the authors of the USB keyboard library as this project is heavily based on their work!
Also, credits to duke2421 who helped a lot with testing, debugging and fixing the device descriptor! And credits to sivar2311 for adding NimBLE support, greatly reducing the memory footprint, fixing advertising issues and for adding the setDelay method.

Issues
  • NimBLE-Arduino (optional) and remove of xTaskCreate

    NimBLE-Arduino (optional) and remove of xTaskCreate

    NimBLE-Mode

    This implements NimBLE-Mode to reduce memory consumption ArduinoIDE: Before including the library, insert the line #define USE_NIMBLE

    #define USE_NIMBLE
    #include <BleKeyboard.h>
    

    PlatformIO: Change your platformio.ini to the following settings

    lib_deps = 
      NimBLE-Arduino
    
    build-flags = 
      -D USE_NIMBLE
    

    Comparison (SendKeyStrokes.ino at run-time)

    | | Standard | NimBLE mode | difference |---|--:|--:|--:| | ESP.getHeapSize() | 296.804 | 321.252 | + 24.448 | | ESP.getFreeHeap() | 143.572 | 260.764 | + 117.192 | | ESP.getSketchSize() | 994.224 | 579.264 | - 414.960 |

    xTaskCreate

    xTaskCreate was removed to fix stack issues.

    opened by sivar2311 22
  • Will the use of bleKeyboard work as a BT Remote Control  ?

    Will the use of bleKeyboard work as a BT Remote Control ?

    Hi, kind of off-topic but do you know if this solution would work as a BT Remote Control for my Satellite Receiver? I've not found any good articles yet how to simulate a BT Remote Control. Now, sat receivers and a lot of new tv's are sold with BT controllers rather than IR...

    In advance, thanx for any help/input.

    opened by TheStigh 13
  • iOS14.1 and iOS12.4.8 cannot find ESP32 BLE keyboard

    iOS14.1 and iOS12.4.8 cannot find ESP32 BLE keyboard

    I use M5StickC have Code include BleKeyboard.h. But they cannot find the device as ESP32 BLE keyboard. Win10 can find the device with Bluetooth. How iOS find the device with BleKeyboard?

    #include <M5StickC.h>
    #include <BleKeyboard.h>
    
    BleKeyboard bleKeyboard;
    
    enum ConfSystem {
      mic = 0,
      video
    } conf;
    int n_conf = 2;
    bool on_air;
    
    void setup() {
      M5.begin();
      bleKeyboard.begin();
    
      Serial.println("Webconf Mute button");
      Serial.println("Push Button A (M5) to toggle MUTE");
      Serial.println("Push Button B to switch VideoOn or VideoOFF");
      M5.Lcd.setRotation(3); // BtnA is left side to LCD
    
      // default
      conf = mic;
      on_air = true;
      update_display();
    }
    
    void loop() {
      M5.update();
      
      if(M5.BtnA.wasPressed()){
        Serial.println("BtnA was pressed");
        if(bleKeyboard.isConnected()){
          on_air = !on_air;
          if(conf==mic){
            send_mute_mic();
          }
          else if(conf==video){
          send_off_video();
          }
        }
        else {
          Serial.println("BLE is not connected");
        }
        update_display();
      }
    
      if(M5.BtnB.wasPressed()){
        Serial.println("BtnB was pressed");
        conf = ConfSystem((conf+1) % n_conf);
        Serial.print("New ConfSystem: ");
        Serial.println(conf);
        update_display();
      }
      delay(10);
    }
    
    void update_display(){
      Serial.println("update_display");
      Serial.print("On air?: ");
      Serial.println(on_air);
      if(on_air){
        show_onair();
      }
      else {
        show_inmute();
      }
    }
    
    void show_onair(){
      M5.Lcd.fillScreen(TFT_RED);
      M5.Lcd.setTextColor(TFT_WHITE, TFT_RED);
      M5.Lcd.setTextSize(3);
      M5.Lcd.setTextDatum(MC_DATUM);
      M5.Lcd.drawString("ON AIR",80,40);
    
      M5.Lcd.setTextSize(2);
      M5.Lcd.setTextDatum(BR_DATUM);
      if(conf==mic){
        M5.Lcd.drawString("Mic",158,78);
      }
      else if (conf==video){
        M5.Lcd.drawString("Video", 158,78);  
      }
    }
    
    void show_inmute(){
      M5.Lcd.fillScreen(TFT_DARKGREY);
      M5.Lcd.setTextColor(TFT_WHITE, TFT_DARKGREY);
      M5.Lcd.setTextSize(3);
      M5.Lcd.setTextDatum(MC_DATUM);
      M5.Lcd.drawString("Muted...",80,40);
    
      M5.Lcd.setTextSize(2);
      M5.Lcd.setTextDatum(BR_DATUM);
      if(conf==mic){
        M5.Lcd.drawString("Mic",158,78);
      }
      else if (conf==video){
        M5.Lcd.drawString("Video", 158,78);  
      }
    }
    
    void send_mute_mic(){
      // https://support.zoom.us/hc/en-us/articles/205683899-Hot-Keys-and-Keyboard-Shortcuts-for-Zoom
      // Command(⌘)+Shift+A: Mute/unmute audio
      Serial.println("Toggle Mic");
      bleKeyboard.press(KEY_LEFT_GUI);
      bleKeyboard.press(KEY_LEFT_SHIFT);
      bleKeyboard.press('a');
      delay(100);
      bleKeyboard.releaseAll();
    }
    
    void send_off_video(){
      // https://www.cisco.com/c/en/us/td/docs/collaboration/CWMS/2_5/b_manage_meetings/b_manage_meetings_chapter_0100.html
      Serial.println("Toggle Video");
      bleKeyboard.press(KEY_LEFT_GUI);
      bleKeyboard.press(KEY_LEFT_SHIFT);
      bleKeyboard.press('v');
      delay(100);
      bleKeyboard.releaseAll();
    }
    
    opened by WebSamuraiDaisuke 13
  • Reason for xTaskCreate in BleKeyboard::begin()?

    Reason for xTaskCreate in BleKeyboard::begin()?

    Hello T-vK!

    I have forked your library to switch to the NimBLE-Arduino library to save memory. While editing I noticed that in the BleKeyboard::begin() function xTaskCreate is used. In the fork I removed this extra task and the library works fine.

    I wonder what is the reason for this extra task? Can you explain it to me in more detail?

    opened by sivar2311 11
  • Problem sending F13 to F24 keys.

    Problem sending F13 to F24 keys.

    Hi, I would like to report a problem sending the keys F13 to F24. I am able to send all the keys otherwise but these keys are not going through.

    I have just tested the key F13 and F6 specifically but have mentioned the 13 to 24 range as those are not the standard keys available on the keyboard.

    Also posting a link to a similar problem faced by other people using the standard keyboard.h library. https://forum.arduino.cc/index.php?topic=324554.0 In the post it is mentioned that the Arduino keyboard code falsely translates the keycodes that are sent via Keyboard.press() It also has a few solutions implemented by people for the usb keyboard.h library.

    Maybe that has something to do with this?

    Thanks

    opened by rp1231 8
  • SNES Control

    SNES Control

    Sorry for my complete ignorance, I'm new to this world of Arduino and ESP32. I thought this work was great and I'm trying to adapt it for a SNES control. For each button on the control I am assigning a key, for button "A" on the control for example, assign the key "x" and sending this data via BLE to the computer with ZSNS. My problem seems to be in the timing, because when pressing a button on the control there is no instant response on the emulator, I have to press several times to enter the command. Was there a way to sync the keyboard input?

    Below my code.

    #include <BleKeyboard.h>

    BleKeyboard bleKeyboard;

    //define where your pins are const int dataPin = 21; // RED const int latchPin = 19; // YELLOW const int clockPin = 18; // BLUE const int intervalo = 250; // atraso entre leituras

    long buttonData, lastButtonData = 72; //01001000

    // On NES Controller there are only 8 buttons, also B, Y swap to A and B const int n_buttons = 12; char* buttons[] = {"B", "Y", "SELECT", "START", "UP", "DOWN", "LEFT", "RIGHT", "A", "X", "L_BUTTON", "R_BUTTON"};

    //Funções que serão chamadas por um array de pinteiros void Button_B() {/Serial.println("Apertou o B bruxo!!!!");/ bleKeyboard.print("z"); delay(intervalo);} void Button_Y(){/Serial.println("Apertou o Y bruxo!!!!");/ bleKeyboard.print("a"); delay(intervalo);} void Button_SELECT(){/Serial.println("Apertou o SELECT bruxo!!!!");/ bleKeyboard.write(KEY_RIGHT_SHIFT); delay(intervalo);} void Button_START(){/Serial.println("Apertou o START bruxo!!!!");/ bleKeyboard.write(KEY_RETURN); delay(intervalo);} void Button_UP(){/Serial.println("Apertou o UP bruxo!!!!");/ bleKeyboard.write(KEY_UP_ARROW); delay(intervalo);} void Button_DOWN(){/Serial.println("Apertou o DOWN bruxo!!!!");/ bleKeyboard.write(KEY_DOWN_ARROW); delay(intervalo);} void Button_LEFT(){/Serial.println("Apertou o LEFT bruxo!!!!");/ bleKeyboard.write(KEY_LEFT_ARROW); delay(intervalo);} void Button_RIGHT(){/Serial.println("Apertou o RIGHT bruxo!!!!");/ bleKeyboard.write(KEY_RIGHT_ARROW); delay(intervalo);} void Button_A(){/Serial.println("Apertou o A bruxo!!!!");/ bleKeyboard.print("x"); delay(intervalo);} void Button_X(){/Serial.println("Apertou o X bruxo!!!!");/ bleKeyboard.print("s"); delay(intervalo);} void Button_L_BUTTON(){/Serial.println("Apertou o L_BUTTON bruxo!!!!");/ bleKeyboard.print("d"); delay(intervalo);} void Button_R_BUTTON(){/Serial.println("Apertou o R_BUTTON bruxo!!!!");/ bleKeyboard.print("c"); delay(intervalo);}

    //Array com os ponteiro que chamará as funções void (*ButtonPointer[])(void) = {Button_B, Button_Y, Button_SELECT, Button_START, Button_UP, Button_DOWN, Button_LEFT, Button_RIGHT, Button_A, Button_X, Button_L_BUTTON, Button_R_BUTTON};

    void setup() { Serial.begin(115200); Serial.println("Starting BLE work!"); bleKeyboard.begin();

    //define pin modes pinMode(latchPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, INPUT);

    //Cria a Task para ler os botões do controle SNES **************************************************** xTaskCreate( taskControleSNES, /* Task function. / "TaskControleSNES", / String with name of task. / 10000, / Stack size in bytes. / NULL, / Parameter passed as input of the task / 1, / Priority of the task. / NULL); / Task handle. / //***************************************************************************************************

    }

    void loop() { if(bleKeyboard.isConnected()) {

    //if (buttonData != lastButtonData){ lastButtonData = buttonData; //Print Raw Value of Registers //Serial.println(buttonData, BIN);

    // Print String in Button Name Array
    for (int n = 0; n < n_buttons; n++)
    {
      if (buttonData & (1 << n) ){
        //Serial.print(buttons[n]);
        ButtonPointer[n]();
        //Serial.print(", ");
      }
    }
    //Serial.println("\n-------------------");
    

    //}

    //delay(10);
      
    //bleKeyboard.releaseAll();
    

    } }

    void taskControleSNES( void * parameter ) {

    while(1){

    // Latch Signal
    

    digitalWrite(latchPin, HIGH); delayMicroseconds(12); digitalWrite(latchPin, LOW);

    int temp = 0; buttonData = 0; for (int i = 0; i < n_buttons; i++) { digitalWrite(clockPin, LOW); delayMicroseconds(0.2); temp = digitalRead(dataPin); // 0 Indicates button depressed for SNES controller if (!temp) { //temp = size_buttonData - i; buttonData = buttonData | ((long)1 << i); } digitalWrite(clockPin, HIGH); }

    //if (buttonData != lastButtonData){ //lastButtonData = buttonData; // Print Raw Value of Registers //Serial.println(buttonData, BIN);

    // Print String in Button Name Array
    

    /* for (int n = 0; n < n_buttons; n++) { if (buttonData & (1 << n) ){ Serial.print(buttons[n]); Serial.print(", "); } } Serial.println("\n-------------------"); */ //} delay(10); }

    vTaskDelete( NULL );

    }

    opened by aieseres 8
  • #include

    #include "sdkconfig.h" file or directory not found

    Disclaimer: This may very well be due to the fact I'm still fairly new to using Arduino controllers and the IDE in general.

    I have the library is included in my project, but when I attempt to verify and upload I get the following error ...\Arduino\libraries\ESP32-BLE-Keyboard-0.1.0/BleConnectionStatus.h:3:10: fatal error: sdkconfig.h: No such file or directory.

    I am trying to upload to a Arduino MKR WiFi 1010 which uses an esp32 chip. I'm using IDE 1.8.8, and I have the esp32 board package version 1.0.4.

    Any help is appreciated.

    opened by ghost 8
  • Reconnecting Issue

    Reconnecting Issue

    Hello Everyone. I have an android Samsung note 20 phone. The problem that when I reconnect my esp32 to my phone it won't control it any more. I have to delete connected device, reconnect again, and then it starts to control. I have tried both libraries 0.3.0 and 0.3.1

    With library 0.2.3 everything works!

    Thank you!

    opened by gugo2808 7
  • Add small delay for writes

    Add small delay for writes

    For long strings, the write function skips a bunch of keys. This is on Windows 10, not sure if it affects other platforms or not.

    Adding few millisecond delay between the key press and release solved it for me. I'm happy to make changes/corrections to my PR if needed!

    opened by samsheff 7
  • ESP32 BLE Scan and BLE Keyboard

    ESP32 BLE Scan and BLE Keyboard

    Hello,

    My task is to scan a Bluetooth and send a message to the monitor whenever the scanned Bluetooth device is found. For this purpose my ESP32 should act as a keyboard. Also I have an LED interfaced, that blinks whenever the Bluetooth is detected.

    I am able to scan and detect the bluetooth, and also blink the LED. But however when I tried to use BLEkeyboard, the loop isnot executed with the condition bleKeyboard.isConnected(). My questions are how do I know why this "if condition" is not satisfied and where can I read my bleKeyboard.print output? I have posted my code below, please help me with your inputs. Thank you.

    #include <BleKeyboard.h>

    /* Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleScan.cpp Ported to Arduino ESP32 by Evandro Copercini */

    #include <BLEDevice.h> #include <BLEUtils.h> #include <BLEScan.h> #include <BLEAdvertisedDevice.h>

    BleKeyboard bleKeyboard;

    String Address = "58:ba:01:ef:ba:12"; const int Pin = 2; int scanTime = 5; //In seconds static BLEAddress pServerAddress; BLEScan pBLEScan;

    class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks { void onResult(BLEAdvertisedDevice advertisedDevice) { Serial.printf("Advertised Device: %s \n", advertisedDevice.toString().c_str()); if (advertisedDevice.getAddress().equals(*pServerAddress))
    { Serial.println("Device Match");
    digitalWrite (Pin, HIGH);
    advertisedDevice.getScan()->stop(); } // Found our server else { Serial.println("Device Mismatch"); digitalWrite (Pin, LOW); } } };

    void setup() { Serial.begin(115200); Serial.println("Scanning..."); Serial.println("Starting BLE Keyboard"); //Begin the BLE keyboard/start advertising the keyboard (so phones can find it) bleKeyboard.begin();

    pinMode(Pin, OUTPUT); pServerAddress = new BLEAddress(Address.c_str()); BLEDevice::init(""); pBLEScan = BLEDevice::getScan(); //create new scan pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster pBLEScan->setInterval(100); pBLEScan->setWindow(99); // less or equal setInterval value }

    void loop() { if (bleKeyboard.isConnected()) { Serial.println("Sending 'Hello world'..."); bleKeyboard.print("Hello world"); bleKeyboard.print(" "); pBLEScan->start(scanTime, false); pBLEScan->clearResults(); // delete results fromBLEScan buffer to release memory delay(2000); } }

    opened by enthusisastSR 7
  • Won't automatically reconnect after power up of ESP32

    Won't automatically reconnect after power up of ESP32

    The example works fine after pairing with my PC. However if my ESP32 is powered down and up then it doesn't work (keyboard commands sent from ESP32 don't work). According to COM port on Arduino messages are being sent and on the PC Bluetooth panel it shows it as connected but it doesn't work until I remove the Bluetooth pairing in the PC and re pair it again,, then its ok until the next power cycle.

    My PC has Bluetooth keyboard and mouse, which don't suffer the same problem. Is there anything I need to do to the code, or am I missing something? Cheers Ian

    opened by icooper9000 6
  • `sdkconfig.h: No such file or directory` on a fresh install for Arduino Nano

    `sdkconfig.h: No such file or directory` on a fresh install for Arduino Nano

    Hi there, I'm getting the error:

    Detecting libraries used...
    [omitted long line]
    Alternatives for BleKeyboard.h: [[email protected]]
    ResolveLibrary(BleKeyboard.h)
      -> candidates: [[email protected]]
    [omitted long line]
    Alternatives for sdkconfig.h: []
    ResolveLibrary(sdkconfig.h)
      -> candidates: []
    In file included from /<homedir>/Documents/Arduino/libraries/ESP32-BLE-Keyboard/examples/SendKeyStrokes/SendKeyStrokes.ino:4:0:
    /<homedir>/Documents/Arduino/libraries/ESP32-BLE-Keyboard/BleKeyboard.h:3:10: fatal error: sdkconfig.h: No such file or directory
     #include "sdkconfig.h"
              ^~~~~~~~~~~~~
    compilation terminated.
    Using library ESP32-BLE-Keyboard at version 0.3.0 in folder: /<homedir>/Documents/Arduino/libraries/ESP32-BLE-Keyboard 
    exit status 1
    Error compiling for board Arduino Nano 33 BLE.
    

    I'm hoping to get this working for the Arduino Nano 33 BLE. Is this possible?

    opened by beyarkay 3
  • Call management with library

    Call management with library

    Hi, I'm using the library to control music or videos on Android and iOS reliably. The next step I want is to be able to pick up calls and hung them up. I've tried every media commands and most of the others, the only thing I achieved is picking up calls only on Android with KEY_MEDIA_PLAY_PAUSE, but then the command just mutes the microphone, it doesnt hang up.

    I'd really appreciate some help to achieve this or at least a response if it's not possible to do so.

    opened by vpeinadolopez 2
  • Not working on reconnection

    Not working on reconnection

    BleKeyboard is working fine after first pairing with an Android device, but no response after reconnection. I tried this with three different phones/tablets. BleKeyboard in recognized and reconnected immediatly after power on. I always have to remove the keypad from the Android device and connect as new to get it working again. Any help appreciated.

    opened by JoDe52078 3
  • Lock Screen Button

    Lock Screen Button

    Hello, Have a bluetooth keyboard, When I push the Lock Screen Button my iPhone Lock, I try to do the same thing with ESP32-BLE-Combo, Can you help me please.

    165034938-0ea5d251-3eaf-49f8-9e16-cbb2d69ff6d0

    opened by wadwin 0
  • Not Working On ESP32-S3 WROOM

    Not Working On ESP32-S3 WROOM

    I am using the following ESP32-s3 library on PlatformIO https://github.com/tasmota/platform-espressif32/ However, even the example doesn't works fine on my ESP32-S3, with no error or warning. I tried to upload the exactly same code to ESP32(not S3), it worked perfectly. I tried every mean, but got myself in desperation, Please Help Me!!!!!!!!! The Log was posted as follow(No Error, No Warning, Seem to succeed, But doesn't work)

    > Executing task: platformio run --target upload --environment esp32s3 <
    
    Processing esp32s3 (platform: https://github.com/tasmota/platform-espressif32/archive/refs/heads/IDF44/ESP32-S3.zip; board: esp32-s3-devkitc-1; framework: arduino)
    ---------------------------------------------------------------------------------------------
    Verbose mode can be enabled via `-v, --verbose` option
    FILESYSTEM  spiffs
    CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
    PLATFORM: Espressif 32 (2.0.3) > Espressif ESP32-S3-DevKitC-1
    HARDWARE: ESP32S3 240MHz, 512KB RAM, 8MB Flash
    DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
    PACKAGES: 
     - framework-arduinoespressif32 2.0.3 
     - tool-esptoolpy 1.30201.220126 (3.2.1) 
     - tool-mklittlefs 1.203.210628 (2.3) 
     - tool-mkspiffs 2.230.0 (2.30) 
     - toolchain-esp32s2ulp 1.22851.191205 (2.28.51) 
     - toolchain-riscv32-esp 8.4.0+2021r2-patch2 
     - toolchain-xtensa-esp32s3 8.4.0+2021r2-patch2
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 34 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- <ESP32 BLE Keyboard> 0.3.2
    |   |-- <ESP32 BLE Arduino> 2.0.0
    Building in release mode
    Retrieving maximum program size .pio/build/esp32s3/firmware.elf
    Checking size .pio/build/esp32s3/firmware.elf
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM:   [=         ]   5.3% (used 27964 bytes from 524288 bytes)
    Flash: [====      ]  36.1% (used 472781 bytes from 1310720 bytes)
    Configuring upload protocol...
    AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
    CURRENT: upload_protocol = esptool
    Looking for upload port...
    Auto-detected: /dev/cu.wchusbserial10
    Uploading .pio/build/esp32s3/firmware.bin
    esptool.py v3.2.1
    Serial port /dev/cu.wchusbserial10
    Connecting..........................
    Chip is ESP32-S3
    Features: WiFi, BLE
    Crystal is 40MHz
    MAC: f4:12:fa:41:c8:34
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Flash will be erased from 0x00000000 to 0x00003fff...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Flash will be erased from 0x0000e000 to 0x0000ffff...
    Flash will be erased from 0x00010000 to 0x00083fff...
    Compressed 12592 bytes to 8871...
    Writing at 0x00000000... (100 %)
    Wrote 12592 bytes (8871 compressed) at 0x00000000 in 0.5 seconds (effective 190.1 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 128...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 223.7 kbit/s)...
    Hash of data verified.
    Compressed 8192 bytes to 47...
    Writing at 0x0000e000... (100 %)
    Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 332.7 kbit/s)...
    Hash of data verified.
    Compressed 473168 bytes to 329265...
    Writing at 0x00010000... (4 %)
    Writing at 0x0001b731... (9 %)
    Writing at 0x00020d59... (14 %)
    Writing at 0x0002672f... (19 %)
    Writing at 0x0002bbad... (23 %)
    Writing at 0x000312cf... (28 %)
    Writing at 0x00036bd8... (33 %)
    Writing at 0x0003be26... (38 %)
    Writing at 0x00040e86... (42 %)
    Writing at 0x00045db8... (47 %)
    Writing at 0x0004bbc9... (52 %)
    Writing at 0x0005160f... (57 %)
    Writing at 0x000569eb... (61 %)
    Writing at 0x0005bedd... (66 %)
    Writing at 0x0006177d... (71 %)
    Writing at 0x00066fc5... (76 %)
    Writing at 0x0006c849... (80 %)
    Writing at 0x000724ac... (85 %)
    Writing at 0x00077515... (90 %)
    Writing at 0x0007d096... (95 %)
    Writing at 0x00082d0e... (100 %)
    Wrote 473168 bytes (329265 compressed) at 0x00010000 in 8.8 seconds (effective 428.3 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    =============================== [SUCCESS] Took 18.93 seconds ===============================
    
    Environment    Status    Duration
    -------------  --------  ------------
    esp32s3        SUCCESS   00:00:18.927
    ================================ 1 succeeded in 00:00:18.927 ================================
    
    opened by TANG617 8
Releases(0.3.2-beta)
  • 0.3.2-beta(Feb 14, 2022)

    Changelog:

    • Feature: Added Numpad Key definitions, PRTSC and version info (Thanks to @DustinWatts for implementing this in PR #126)
    • Fix: Fixed #10 and #62 - The default example caused issues for users of certain operating systems / devices (Thanks to @ScaredyCat for fixing this in PR #134 and #135)
    • Fix: Fixed #141 - A bug that caused Bluetooth reconnect issues (Thanks to @sivar2311 for fixing this)
    Source code(tar.gz)
    Source code(zip)
    ESP32-BLE-Keyboard.zip(10.34 KB)
  • 0.3.1-beta(Oct 1, 2021)

    Changelog:

    • Fix: Fixed the settings for platformio (Thanks to @sivar2311 for implementing this in PR #117)
    • Fix: Fixed #115 - A bug that causes the library to fail after reconnecting (Thanks to @sivar2311 for implementing this in PR #117)
    • Fix: Fixed #115 - A bug that causes the library to fail after reconnecting (Thanks to @sivar2311 for implementing this in PR #117)
    • Feature: Added new methods that allow setting the VendorID, ProductID and Version (Thanks to @sivar2311 for implementing this in PR #117)
    Source code(tar.gz)
    Source code(zip)
    ESP32-BLE-Keyboard.zip(10.25 KB)
  • 0.3.0(Sep 10, 2021)

    Changelog:

    • Fix: Reduce the max. device/manufacturer name length to fix compatibility issues with Apple devices (Thanks to @sivar2311 for implementing this in PR #111)
    • Fix: Added a default delay of 8 milliseconds between each key event in order to compensate for slow applications that can't properly handle fast input (Thanks to @sivar2311 for implementing this in PR #111)
    • Feature: Added a setDelay method to set the delay mentioned above to a custom value (Thanks to @sivar2311 for implementing this in PR #111)
    • Fix: Reduce memory footprint (meaning you can use WiFi and BLE together now) (Thanks to @sivar2311 for implementing this in PR #111)
    • Feature: Added support for NimBLE to further reduce the memory footprint (Thanks to @sivar2311 for implementing this in PR #111)
    • Fix: Start advertising on disconnect again to ensure the device will show up on again on Apple devices (Thanks to @aovestdipaperino and @sivar2311 for implementing this in PR #86 and PR #111)
    • Refactor: Everything is implemented in the BleKeyboard class now. KeyboardOutputCallbacks and BleConnectionStatus are not necessary anymore and have been removed.
    • Feature: added setName function to allow changing the name of the device using a stored preference (must be called before begin) (Thanks to @millst for implementing this in PR #100)
    • Docs: Added documentation and information on NimBLE to the Readme (Thanks to @sivar2311 for implementing this in PR #111)
    Source code(tar.gz)
    Source code(zip)
    ESP32-BLE-Keyboard.zip(9.80 KB)
  • 0.2.3(Apr 21, 2021)

  • 0.2.2(Oct 20, 2020)

    Changelog:

    • Feature: Added onStarted hook (Thanks to @dvv for implementing this in PR #19)
    • Fix: Media keys now work on Android after reconnecting (Thanks to @aovestdipaperino for fixing this in PR #49 and to @nikolayrantsev for reporting #35 )
    • Docs: Fix typo in README (Thanks to @abelykh0 for reporting)
    • Docs: Updated feature list in README
    Source code(tar.gz)
    Source code(zip)
    ESP32-BLE-Keyboard.zip(10.26 KB)
  • 0.2.1(Feb 27, 2020)

  • 0.2.0(Feb 13, 2020)

Owner
I love writing (and contributing to) free open source software. I also love Linux, hardware-hacking and diy electronics.
null
Exploits the Wii U's bluetooth stack to gain IOSU kernel access via bluetooth.

BluuBomb Exploits the Wii U's bluetooth stack to gain IOSU kernel access via bluetooth. For a more detailed write-up see WRITEUP.md. Not to be confuse

null 86 May 12, 2022
Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.

BluetoothJoystick Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.

null 9 Feb 24, 2022
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE

INSTRUCTIONS - The codes for the Fingerprint Door lock are present in the Code For Fingerprint Door Lock folder The instructions of how to operate the

Akhil Sahukaru 15 Mar 3, 2022
ESP32 S2 C++ host library compatible with arduino, esp-idf.

Info I would like to announce USB host library for esp32 S2 compatible with arduino, esp-idf and PIO (when pio will be updated to most recent esp-idf)

null 14 Apr 20, 2022
Adafruit GFX compatible arduino library for using cat thermal printers with the ESP32

CatGFX This library offers a Adafruit GFX "driver" for ESP32 and the cheap cat (or rabbit?) BLE thermal printers like this one: For usage information

Claus Näveke 1 Dec 18, 2021
Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

null 1.2k May 11, 2022
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

null 5 Feb 4, 2022
split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support.

split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support. This keyboar

null 42 May 10, 2022
Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard

Raspberry Pi 400 as a USB HID Keyboard Hook your Pi 400 up to your PC somehow, using a USB Type-C cable into the power port. Anker make good ones- I u

Philip Howard 137 May 17, 2022
Use Atari keyboard as USB keyboard with a Teensy 3.6

Atari Keyboard Convert an Atari 600/800/1200 XL into a USB keyboard. I bricked my Atari mainboard. My goal is to use the keyboard of the Atari on a Ra

Jos Koenis 2 Dec 3, 2021
Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

Jari Tulilahti 8 May 6, 2022
Bluetooth low energy (BLE) tracker for ESP32

BLEcker Bluetooth low energy (BLE) tracker for ESP32 This software is written for ESP32 boards to track BLE devices. It can be used for your smart hom

Vörös Ákos 38 Apr 23, 2022
A handy little system information monitor using and ESP32 + ILI9488 TFT. Receives data over Serial Bluetooth.

Bluetooth-System-Monitor A handy little system information monitor using and ESP32 + ILI9488 TFT. Receives data over Serial Bluetooth and thus giving

Dustin Watts 23 May 9, 2022
Bluetooth Monitor port for the ESP32

ESP32 BT Monitor What is it? This is a (at the moment partial) port of andrewjfreyer/monitor for the popular and super cheap ESP32 boards. For a more

null 32 May 14, 2022
Bluetooth Gateway for Phantom Remote Control based on ESP32

Phantom remote control Bluetooth gateway An ESP3232 firmware for the gateway of Phantom remote control, which can push the temperature and humidity data of Phantom remote control through LAN, and also support to control Phantom remote control to send and receive IR data through LAN.

George Zhao 13 Jan 23, 2022
Some sketches for the VL53L5CX ranging camera for use with the Arduino IDE

VL53L5CX Some examples for the ST's VL53L5CX 8 x 8 pixel ranging camera using Simon Levy's Arduino library and Seth Bonn's multi-byte I2C read and wri

Kris Winer 17 May 4, 2022
ESP-32 CAM implementation of a Bird classifier using Arduino IDE

Bird-Classifier ESP-32 CAM implementation of a Bird classifier using Arduino IDE For the file server to run, you also need to have the ESP32 SD File M

null 3 Mar 28, 2022
null 225 May 14, 2022
Arduino Sketch and a Web Bluetooth API for loading models and running inference on the Nano Sense 33 BLE device.

TF4Micro Motion Kit This repo contains the Arduino Sketch and a Web Bluetooth API for loading models and running inference on the device. Install and

Google Creative Lab 44 May 6, 2022