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.

Comments
  • 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
  • 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 8
  • 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
  • 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
  • Keyboard stops working after reconnect

    Keyboard stops working after reconnect

    Hi, I am using the 0.3.0 version with Windows 10 and I noticed, that when I add after I add the esp32 keyboard as a new bluetooth device on my windows computer, everything works just fine, the keys work and all, but if the bluetooth conenction is lost, because i turn the esp32 off and on for example, then even though the windows reconnects to the esp32 and it changes status from PAIRED to CONNECTED under the bluetooth devices, the keyboard no longer works and the only way to make it work again is to remove the esp32 keyboard from bluetooth devices on windows and then add it again, after which it works until the next time signal is lost.

    I tried downgrading to 0.2.3 which works flawlessly and doesn't have this bug.

    opened by MikeX7 7
  • Conflicts between BleServer and WiFiClientSecure

    Conflicts between BleServer and WiFiClientSecure

    Hi, in my project i'm using ESP32 as a client with the library WiFiClientSecure. The problem is that my esp doesn't connect with my server in python because this library goes in conflict with blekeyboard.begin(). Is there a solution to disable blekeyboard and active its later?

    opened by Alberto-00 0
  • Isn't working with tft_eSPI library

    Isn't working with tft_eSPI library

    When I use the BLE-Keyboard library with tft_eSPI library, , then only the BLE-Keyboard is working and the tft_eSPI is not working. When I remove "bleKeyboard.begin();" from the code then everything besides the Keyboard works, but it is not possible for me to get them working together for some reason.

    opened by LozockHD 0
  • Windows Wakes from Sleep by itself

    Windows Wakes from Sleep by itself

    For some reason my PC wakes up by itself from sleep. Sleep works normally when I unpair it from setting but when I repair it wakes up after 3-5 seconds.

    opened by 0xPeero 0
  • Incompatible with usb keyboard demo from esp library

    Incompatible with usb keyboard demo from esp library

    The following imports conflict with eachother. This is an issue as I would like to use usb and bluetooth keyboards in the same program.

    // Bluetooth Libraries
    #include <BleKeyboard.h>
    
    // USB Libraries
    #include "USB.h"
    #include "USBHIDKeyboard.h"
    

    The full program looks somewhat like this

    // Bluetooth Libraries
    #include <BleKeyboard.h>
    BleKeyboard bleKeyboard;
    
    // USB Libraries
    #include "USB.h"
    #include "USBHIDKeyboard.h"
    USBHIDKeyboard Keyboard;
    
    // Button On Board Feather
    const int buttonPin = 0;
    int buttonState = 0;  // variable for reading the pushbutton status
    
    String msg = "Hello Gamer";
    
    void setup() {
      Serial.begin(115200);
      delay(1000);
      
      Serial.println("Starting BLE work!");
      bleKeyboard.begin();
      
      Keyboard.begin();
      USB.begin();
    
      pinMode(buttonPin, INPUT_PULLUP);
    }
    
    void loop() {
      bleKeyboard.setBatteryLevel(98);
      buttonState = digitalRead(buttonPin);
      // Serial.println("checking button");
      // Serial.println(buttonState == LOW);
      if (buttonState == LOW){
        if(bleKeyboard.isConnected()) {
          Serial.println("Using Bluetooth");
          bleKeyboard.print(msg);
        } 
        else {
          Serial.println("Using USB");
          Keyboard.print(msg);
        }
        delay(500);
      }
      delay(10);
    }
    
    opened by PeterHindes 3
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 99 Dec 17, 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 17 Nov 15, 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 5 Sep 23, 2022
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.6k Jan 8, 2023
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 6 Oct 27, 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 42 Jan 3, 2023
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 32 Dec 22, 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 38 Dec 28, 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 14 Nov 3, 2022
null 313 Dec 31, 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 18 Dec 8, 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
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 54 Jan 7, 2023
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 182 Dec 12, 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 9 Dec 23, 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 52 Nov 24, 2022