Perfect timing. I've been thinking about making a Bluetooth macro keyboard for the last week or so to use while drawing on my Surface Pro. Most of the official tablet shortcut key devices use a dongle, are wired or cost a fortune. I didn't really want to use up the single USB port. I think this will do perfectly. Thanks Brian.
@MakeTeachRepeat4 жыл бұрын
Brian - this video solved an issue I had with HID on the ESP32 for a looooooooong time. So thank you very much. This deserves a like, subscribe and a share.
@BrianLough4 жыл бұрын
That's great! I have been planning a Bluetooth hid video for a while, but using the gist method, but i had some problems around pressing multiple keys I think. I found this library a couple of weeks ago and couldn't believe how simple it made it!
@j.g.42562 ай бұрын
Thank you, I am using this for creating an accessible Bluetooth controller for a special education K-12 teacher who needs accessible switches, and this tutorial is great
@maxxxhelll Жыл бұрын
Thanks for all your informative videos and I would suggest that you add a part II to this video which includes ESP32 interrupts to make it more battery friendly. I look forward to watching another great tutorial from you.
@majinkeyboards3 жыл бұрын
The ctrl+alt+delete every 100ms and awkward part gave me a good laugh! Good stuff
@ScaryLasers4 ай бұрын
same. when i first connected... LOL
@petenztube8592 Жыл бұрын
Dude, you are a genius. Thanks for this!
@stephenhookings19854 жыл бұрын
Excellent work. I was ran out of space on a digiStump. And promicro didn't like to compile. Never used the ESP8266 but looks like I am going to thanks! I have two applications - one to use old PS2 keyboard to control computer games (so I can map.keys to USB but if I can instead send via Bluetooth then even better) The 2nd app - to send Bluetooth to Android app to operate sheet music viewer. I do this at the moment with a Bluetooth keypad and some mechanical foot switch. With the above I can simply make a couple of buttons and send page up / page down. Thanks again for sharing.
@kioro2423 Жыл бұрын
I know it's an old comment but for everyone's information, he used an ESP32 here, not ESP8266. ESP8266 doesn't have Bluetooth (and some deviations of ESP32 may not have it either). Hope your project worked out great!
@stephenhookings19854 жыл бұрын
Excellent work from you and the BT library writer. I got an ESP32 with inbuilt OLED - my planned usage is to wire in a couple of footswitch operated buttons to send page up/down to an Android music page turner app. Should be considerable cheaper and more versatile than commercial hardware.
@ronkloiber2 жыл бұрын
It would be great to have the codes in a file stored onboard that would be accessible like a drive over the USB connection. That way you wouldn't need to redo and Arduino code when you want to change a button function.
@vince0864 жыл бұрын
Great timing, just started working on a small project that's in the same vein. I'm putting together a wireless (BT) volume knob using an encoder and some media control buttons, so all this info will be really helpful.
@BrianLough4 жыл бұрын
This sounds perfect for this, I haven't tested the volume media button commands but I imagine they work fine !
@jaynottelling58924 жыл бұрын
A couple of cheapy slider potentiometers, for mic & speaker, a lil 3d design/printing for a case. U could even go look at some of the esp/Arduino midi controller projects for a variety of DIY inputs, i made an esp32 pressure sensitive drums and button combo midisynth a few months back(still haven't made the case or its own amp for it, but it's fun wired up to an old stereo).
@arnonymous81139 ай бұрын
I tried programming a BLE-Keyboard in MicroPython and failed miserably. I guess i have to learn the Basics of Bluetooth. The T-vK/ESP32-BLE-Keyboard Library works out of the Box, connecting to a Windows 11 Machine instantly. I will continue from there, this looks quite easy.
@hz87113 жыл бұрын
Thank you, works perfectly on esp32 too, you just need to change the pins.
@freeyourinnertube4 жыл бұрын
I think this could make a very useful mqtt keypad for triggering home automations via bluetooth to a rpi running eg node red. Ive a number of modified tradfrei switches (A Speisse video) with 5 buttons for this purpose, but I always seem to need one more button. This plus a little screen could make a menu driven, keypad for such use.
@ChunkySteveo4 жыл бұрын
Awesome project Brian!!
@PaulinhoACdS6 ай бұрын
Hi. I'm trying to make the ESP32 Bluetooth that you posted on KZbin, but I'm a total layman and I can't understand it. Would you have the sketch ready to download to the ESP32, .ino file? Would you mind sharing it?
@BingoBongoBengo4 жыл бұрын
This was a super useful and well made video, cheers man 👍
@1001panoramas Жыл бұрын
Thanks for all this. That's what I needed for my project and it works fine !
@arthuratkins59024 жыл бұрын
I’m brand new to this. This was very helpful! Thank you!
@AJB2K34 жыл бұрын
Thanks Brian, just what I was looking for.
@JustinEltoft2 жыл бұрын
THANK YOU! This is just what I was looking for.
@MarionMakarewicz4 жыл бұрын
This is the video I am looking for. Exact tech for the same use case for OBS. Thanks. Ok, next day. Just plugged everything in, set up the IDE for my ESP32, installed the code and it worked perfectly. Next is getting that battery set up for wireless, although how I have my OBS set up with my laptop, It's fine even with a powered ESP32. I typically use the number keypad on a full size keyboard for OBS hotkeys and even and a Bluetooth number keypad that I bought for remote use. That's set up where I normally stream with a full computer. This is going to be the remote for mobile streams.
@miguelelinventor3 жыл бұрын
Thanks you for share it, it is perfect to make a custom wireless keyboard and more!!
@jon_raymond4 жыл бұрын
Can you explain that magical on/off switch of yours? I searched Digikey but couldn't find a "cardboard" part. ;)
@viniciusnoyoutube4 жыл бұрын
Excellent work! Thanks.
@augustomasetti69064 жыл бұрын
I love the library, I'm using it for a game controller !
@sblee3493 жыл бұрын
Hi, I've tried with the example and esp32keyboard is not showing up in my bluetooth options for my laptop. I am using a Macbook. How am I supposed to do the pairing?
@christopherr84412 жыл бұрын
I have a question, would this work on an iOS device like an iPad? Are the keystrokes the same on something like an iPad?
@rgbcrafts4 ай бұрын
Would a button matrix like this would fit properly on a game controller setup? Meaning, would multiple buttons pressed at the same time conflict like old keyboards limits had in the past or it's good to go as a custom project?
@АлексейСивоконь-р5к4 ай бұрын
Hi, Brian The example in the library doesn't compile. GPT says there is a problem with String types.
@DancyHqt4 ай бұрын
yes me too
@АлексейСивоконь-р5к4 ай бұрын
@@DancyHqt This helped me. Hey there, I fixed this by making some really small changes to the BleKeyboard.cpp file in /Users/USERNAME/Documents/Arduino/libraries/ESP32_BLE_Keyboard/BleKeyboard.cpp: LINE 106: BLEDevice::init(deviceName.c_str()); ... LINE 117: hid->manufacturer()->setValue(deviceManufacturer.c_str());
@DancyHqt4 ай бұрын
@@АлексейСивоконь-р5к I love you brooo!! I fixed it!!!
@AudisioOficiaIАй бұрын
@@АлексейСивоконь-р5к not working, /home/ton/Arduino/libraries/ESP32_BLE_Keyboard/BleKeyboard.cpp: In member function 'void BleKeyboard::begin()': /home/ton/Arduino/libraries/ESP32_BLE_Keyboard/BleKeyboard.cpp:105:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'String' 105 | BLEDevice::init(deviceName); | ^~~~~~~~~~ | | | std::string {aka std::__cxx11::basic_string} In file included from /home/ton/Arduino/libraries/ESP32_BLE_Keyboard/BleKeyboard.cpp:7: /home/ton/.arduino15/packages/esp32/hardware/esp32/3.0.2/libraries/BLE/src/BLEDevice.h:41:27: note: initializing argument 1 of 'static void BLEDevice::init(String)' 41 | static void init(String deviceName); // Initialize the local BLE environment. | ~~~~~~~^~~~~~~~~~ /home/ton/Arduino/libraries/ESP32_BLE_Keyboard/BleKeyboard.cpp:107:9: error: expected unqualified-id before '->' token 107 | Server->setCallbacks(this); | ^~ /home/ton/Arduino/libraries/ESP32_BLE_Keyboard/BleKeyboard.cpp:109:26: error: 'pServer' was not declared in this scope; did you mean 'Server'? 109 | hid = new BLEHIDDevice(pServer);
@itsmalayАй бұрын
Can we simply use the binary system and register up to 2^8 keys ? i mean suppose i made a keyboard which sends 0s and 1s combination for each key press in a different pattern.
@xyloidify4 жыл бұрын
Thanks Brian, well done!
@HeimoVN4 жыл бұрын
Very nice video, thank you for making it...
@tanleproe4 жыл бұрын
I like it. It seems that it can emulate the keyboard on a Windows O/S PC. What is the equivalent key modifiers for Mac O/S? For example: Shift + Command + Control
@B-U-N-N-I3 жыл бұрын
can this be done if I've only got a USB output header on the keyboard? D+ and D- instead of the 8 pins like the keypad.
@aofddofa66612 жыл бұрын
you are awesome ... as you know :) ... one Q , instead of BLE .. is it possible to emulate real usb ? so i connect the esp32 usb to my pc and act as digispark to send keyboard keystroke to the pc?
@dmitriiternovskii2759 Жыл бұрын
Thanks! How can I control the bluetooth power in the ESP32? make it more or less
@roblatour35113 жыл бұрын
Thank you that was a great video - helped me a lot.
@CRAugustoSalazarMontes2 жыл бұрын
great video, thanks for your work, something that I would like is the implementation of the creation of a virtual "Com" position through esp32 and thus be able to use devices through my network, greetings from Mexico
@andrewduma6467Ай бұрын
How to send rewind and fast forward keys to the connected device?
@mtayseer824 жыл бұрын
This is really valuable. Thanks
@BrianLough4 жыл бұрын
Your welcome!
@MrLfarah2 жыл бұрын
Hi. I confused. How i make a 2(rows) x 4 ( collums) ? I need a diagram and the code.
@davedm6345Ай бұрын
Can i do the same tutorial on a ESP32-C3 MINI ? thanks
@ujjainia123 Жыл бұрын
I want to serial Bluetooth to hid Bluetooth keyboard ... Possible in one board ??
@Tankhank2 жыл бұрын
I’m having trouble deciding what battery to use with mine. Any pointers?
@MrTohnitan4 жыл бұрын
Really helpful. Thank you. Can you tell me how long it takes the device to reconnect to the pc? I know it can vary, but I wanna know if it's a viable solution to a shortcut keyboard which goes to deepsleep between presses.
@arunrajmbbs3 жыл бұрын
Hi Sir can you make a ble mouse ? Joystick , for controlling onscreen cursor ?
@charnjit5255 ай бұрын
Can I control vol up and down of my android phone using this library with Arduino board+BT hc 05 module,,?? Thank you,
@polishka75296 ай бұрын
i've seen a few videos like this and feel compelled to ask. what does the "inc" in the title mean?
@uygarbocutoglu4465 Жыл бұрын
ı have always faced problems with the bluetooth why not ESP8266 wifi with lower power consumption and benefits of 2.4 ghz?
@kayquexavierscapolan91453 жыл бұрын
How can i do to achieve the oposite? I have a bluetooth joystick, and i wanted to connect it to my esp 32 and extract the signals from the axis.
@LegitLeeVelez4 жыл бұрын
How would you add a regular single push button to this in stead of a push button matrix?
@requiem4adreamc Жыл бұрын
Windows 10 does not connecting to esp32 keyboard. It seen in bluetooth. But it says "Try connecting your device again". Any suggestions?
@InnovCreator2 ай бұрын
I have been working with the same library.... It's throwing error of string conversions in windows 11 ? Was there some update or am I doing something wrong..??
@AudisioOficiaIАй бұрын
same
@dhruvajindal49323 жыл бұрын
Can we use it in wired mode? Like the Arduino Leonardo.
@huyvu94403 жыл бұрын
Nice tutorial. Did you have issue with bluetooth not automatically connect after a power cycle?
@lilnessy2 жыл бұрын
Hey thanks for the detailed video, i have just come across it, question Is it possible to use 28 buttons? I have 28 commands,
@najamiqbal55033 жыл бұрын
Hi. Great work I wanted to know if there's any way uptill now that we can use esp32 an an HID wired keyboard. Just like people have implemented it on stm32
@BrianLough3 жыл бұрын
Nope, ESP32 doesnt support HID over USB. ESP32-S2 should, but I havent tried it
@Taki7o72 жыл бұрын
Hmm but if i want to use their Mouse Library as well, i would have to disconnect and connect again with the other device constructor. With HID-Project for example over USB, you can send either keyboard or mouse codes
@dhruvajindal49323 жыл бұрын
Does it for the 'Enter' key?
@petermarin3 жыл бұрын
Does this work on the older d1 mini?
@liamjoseph992 Жыл бұрын
Can you still purchase the tinypico you use in this video? Seen similar looking ones but they are very expensive now.
@BrianLough Жыл бұрын
I believe the tinypico available now is a different revision but it's essentially the same
@Raven-custom Жыл бұрын
Hi, is it possible to use the keyboard without Bluetooth?
@Andy-rq6rq4 жыл бұрын
Very helpful! Thanks!
@shyleshsrinivasan50924 жыл бұрын
Thanks for sharing this !!
@paulb36utube4 жыл бұрын
Great project. Inspired me to try a 4x4 BLE keypad for a button box for a game. I cant seem to get rid of the CTL ALT DEL (which is confusing the game) without an error compiling. Any suggestions Brian.
@andrewjoe42843 жыл бұрын
this is realy helpful fo rme to understand the use of BLE keyboard library! However, im interested in making usb2bt converter for my TKL-sized mechanical keyboard. do you have any advice on starting buiilding it using esp 32? it would really help me out to do this project. cheers
@welshdave52633 жыл бұрын
I think I'll use this for when my mobile is in the case 8n the motorbike. Unlocking the screen and other basic functions are difficult when wearing gloves and not safe during motion.
@AlexLipkovich3 жыл бұрын
Can I add a password authentication before paring?
@PinataOblongata4 жыл бұрын
I'd like to build an adaptor that turns any wired keyboard into a BT/wifi one, plus adds multimedia buttons and volume knob - buy any low-cost wired mech and have the benefit of expensive wireless mechs with extra fruit! Can I use a tinypico (or similar) and this library to do this? Is it just a matter of reading the key-press and sending it on with these library constants? Will it work for all keys including modifiers and such? And can I use the same USB port as both an "in" (for charging and control when hooked to a PC) and an "out" (for providing power to the kb and receiving keystrokes from it when hooked to a kb)? Sorry for so many questions, just wondering if it's possible and if a tinypico is the way to go. Thanks
@BrianLough4 жыл бұрын
Hey, a few things to get through, but I'll try! The TinyPico is an ESP32 board, so the same will apply for all ESP32 based boards. 1) This library should be able to emulate the keyboard fine, I was using modifiers in my example so I don't think that should be a problem, I haven't done much more with this library than shown here though. 2) No, you will not be able to receive USB commands via the micro USB cable. Check out this video by Bitluni where he uses an external chip to act as USB host, but it's still early in development. kzbin.info/www/bejne/pqCWd3WajpV6iZY The other part of this question, the USB port will charge the battery when plugged in.
@PinataOblongata4 жыл бұрын
@@BrianLough Thanks so much!
@MM-321 Жыл бұрын
Very interesting video. Can I use this on an ESP8266?
@Rossvallance Жыл бұрын
Hello Brian. I am a few years behind you, following the same path as you. Have you learned much over the last couple of years that you want to share ? I am in the middle of a project, and very hung up on the implementation of a small/tiny bluetooth keyboard. Any chance you could keep sharing some of your data ?
@MrKwizzles2 жыл бұрын
trying to build this, does anyonre know of any smaller batteries/battery packs i could use?
@joaofonseca60834 жыл бұрын
can this be used with a usb host to make a wired usb keyboard wireless?
@objectobject61723 жыл бұрын
Just to check, ESP32 also can do USB, no? As in, doing the same thing over a USB connection instead of BLE?
@BrianLough3 жыл бұрын
Plain esp32 can not do HID over USB. Esp-s2 can (but that doesn't have Bluetooth)
@objectobject61723 жыл бұрын
@@BrianLough Cool, thank you! This may have saved me some headache later
@dixon2663 жыл бұрын
Hey, awesome video, thanks for sharing! I'm looking forward to making a similar build but my use case is different and I need it to be as small as possible, is there a smaller version of ESP32? or of a keypad that isn't setup like the one you have but rather, a single button? I'm only need 3 but 4 would be nice. Any ideas? Thanks alot!
@GalaxyYT.8 ай бұрын
Can you do the same, but without bluetooth?
@Dareekun Жыл бұрын
Wait, it really different, the old one or from evan kale it self, to convert your old wired hid, keyboard or mouse into wireless mouse with bluetooth
@clmb22253 жыл бұрын
thanks for your video. i learned something. Is it also possible to use an ESP as a Bluetooth receiver? I was thinking of an AB shutter3 or keyboard to switch a GPIO port.
@BrianLough3 жыл бұрын
Technically possible, but I haven't seen a good implentation. Search for "ESP32 BLE HOST"
@TechnoWit3D2 жыл бұрын
hi Brian, can you make tutorial for programable wireless esp32 macropad using QMK and VIA?
@TechnoWit3D2 жыл бұрын
is there any update regarding the battery level ?
@bangunsetyoanggoro61563 жыл бұрын
I have trouble with this library, that i am must reconect wheen esp32 sleep
@Made_by_john4 жыл бұрын
Hi. I'm trying to understand how to redo function on the number 1 on the keypad. 1 on keypad should be used for play / pause 2 for "next" and so on. Can do make a simple example that shows how to do so I can get started Please John
@thecreatorandreviewer96804 жыл бұрын
just replace sendMacroCommand(KEY_F1); with bleKeyboard.press(KEY_MEDIA_PLAY_PAUSE); bleKeyboard.press(KEY_MEDIA_NEXT_TRACK); bleKeyboard.press(KEY_MEDIA_PREVIOUS_TRACK); ig this will help u for more help just comment on any one of my video
@Made_by_john3 жыл бұрын
@@thecreatorandreviewer9680 Hello , do know where i can find list of all keycodes , John
@cuibararhi4 жыл бұрын
hey, thanks for the tut! can this be used as a controller for a diy keyboard (where you solder wires to the switches without using a pcu). Also can this be used to make a keyboard that has a wired only pcu have bluetooth compatibility? thanks again!
@BrianLough4 жыл бұрын
If you can read the inputs from the keyboard I don't see why not. A full keyboard, even using button matrix or something, would use a lot of pins
@jamesm69514 жыл бұрын
Hey, great project. Does your code handle the situation of idle user time where it reduces power consumption if nothing has been pressed?
@jaycheda32322 жыл бұрын
will a esp32cam work?
@andymouse4 жыл бұрын
Interesting stuff !
@Simon-fb2od3 жыл бұрын
Will this work on a Wemos D1 Mini which has an ESP8266? It's a very informative video! I didn't know it could work over bluetooth.
@ritvarsrizikovs71173 жыл бұрын
Hello! Nice project! I made similar project, but got following problem: Android is connected to this HID Keyboard, but if I send every 100ms for example 1 key - 1 second it does not send anything and then after got all those 10 presses. (Very bad response time). Do You know how to to fix unstable timing for key presses? (I am using ESP32 as external arrow buttons for my android phone to control map with 4 arrows and Letter C)
@takedowntheccp.51674 жыл бұрын
very good thank you!
@takedowntheccp.51674 жыл бұрын
can you use the ESP32 create a project NB-lot control temperature drive ...........
@chikenpaww3 жыл бұрын
dude, my Bluetooth conection didnt always fixed, it always in pairing mode after unused for couple of minute
@tetra3dprint4 жыл бұрын
Great video.
@bakedbeings3 жыл бұрын
Could you us this to create a keyboard bluetoothifier? Connect and power a keyboard via usb OTG, listen to incoming keycodes, send those over bluetooth HID to the main PC? Not the world's speediest bluetooth but, hell, the flexibility!
@BrianLough3 жыл бұрын
In theory yes, but usb host is not very straightforward. But if you could do the usb host part you definitely could
@bakedbeings3 жыл бұрын
@@BrianLough Yeah I had a look into it and using an OTG cable helps (they have a 5th pin grounding the drain wire). The leaf can't charge a lipo though can it? Neither can a pi pico without a shim. I'm struggling to find a way to get it put together affordably - i suspect there's board out there.
@jontscott4 жыл бұрын
Wow that is really cool. Now has anyone done the opposite, use a real Bluetooth keyboard to send key presses to an ESP32 and let the ESP32 turn on motors, lights etc with GPIOs?
@BrianLough4 жыл бұрын
There is someone on my discord who has done some work around getting BLE gamepads working on the esp32, not sure about keyboards, you could ask him though, bitbank is his name on there, link in the description
@viniciusrocha284610 ай бұрын
Hello friend, sorry for any errors in this text (I'm using Google Translate). I'm thinking about transforming my keyboard (wired Razer Huntsman) into a wireless keyboard, do you think that using the DOIT ESP32 - ESP32-WROOM-32D I can do it?
@BrianLough10 ай бұрын
Not on its own. You need something to read the input from the razer keyboard. What you are looking for is a "USB host". There are some shields that can do it, or something like the rp2040 can either
@allinclusive57624 жыл бұрын
Top of the pops! 👍
@SchwertKruemel4 жыл бұрын
Can i connect a full laptop keyboard (an Alienware 15r3 to be precise) to that controller an turn it into a "normal" bluetooth keyboard to use on my desktop PC? I just love the feeling of that keyboard and would like to use it on PC
@BrianLough4 жыл бұрын
If you could integrate the keyboard with the Arduino then you could in theory make it
@gustavo.rabelo4 жыл бұрын
Thanks man! Can I use it as a keyboard and in parallel send information to an application on the smartphone without print the key or an entire word?
@gustavo.rabelo4 жыл бұрын
Someone can help me?? using the bluetooth as keyboard will affect the use with a smartphone application?
@jackrzhai55163 жыл бұрын
Brother. You use the Esp32 program. If you can share it quickly.
@haimontage633 Жыл бұрын
can i use to diy controller ps4 ?, im from vietnammese, so my english so bad
@majRFan2 жыл бұрын
Can i connect and use this on iPad OS / iOS... Please reply
@BrianLough2 жыл бұрын
I assume so, but I don't have one so I can't confirm
@majRFan2 жыл бұрын
@@BrianLough ok thanks.
@ManoharOfficial3 жыл бұрын
Is it possible to make wired mechanical keyboard wireless using an esp32?