GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsThe ESP32-S3 has native USB, so with the Arduino core it can act as a USB keyboard (HID). The computer needs no driver; it simply sees a new keyboard. The Waveshare ESP32-S3 Mini is small enough to fit in a tiny box with four buttons. Each button sends a key combination; change them to suit your editor, video calls or games.
Do not store passwords as macros; anyone can press the button.
Tick anything you already have and the total updates.
Waveshare ESP32-S3 Mini
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB from the computer.
macropad.inoVerify & upload in Electrolark#include "USB.h"
#include "USBHIDKeyboard.h"
USBHIDKeyboard Keyboard;
const int PINS[4] = {1, 2, 3, 4};
bool last[4] = {HIGH, HIGH, HIGH, HIGH};
void combo(uint8_t mod, uint8_t key) {
Keyboard.press(mod); Keyboard.press(key); delay(20); Keyboard.releaseAll();
}
void setup() {
for (int i = 0; i < 4; i++) pinMode(PINS[i], INPUT_PULLUP);
Keyboard.begin();
USB.begin();
}
void loop() {
for (int i = 0; i < 4; i++) {
bool now = digitalRead(PINS[i]);
if (now == LOW && last[i] == HIGH) {
if (i == 0) combo(KEY_LEFT_CTRL, 'c'); // copy (use KEY_LEFT_GUI on a Mac)
if (i == 1) combo(KEY_LEFT_CTRL, 'v'); // paste
if (i == 2) combo(KEY_LEFT_CTRL, 'z'); // undo
if (i == 3) Keyboard.write(KEY_PRINT_SCREEN);
delay(30);
}
last[i] = now;
}
}
Check USB Mode is USB-OTG (TinyUSB); in the other mode the S3 is only a serial port.
Normal in HID mode; hold BOOT while plugging in to upload again.
Add a longer debounce delay or a 100 nF capacitor across each button.
Yes, Android phones accept USB keyboards through an OTG adapter.
Yes, use Keyboard.print('text') for a saved phrase.
The S3 can also be a Bluetooth keyboard with a BLE keyboard library.
4 parts: Waveshare ESP32-S3 Mini Development Board w/ ESP32-S3FH4R2, 240MHz, Wi-Fi & BLE 5, 4 × Tactile Push Button Switch, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a beginner project and takes about 1 hour. The build on this page has 5 steps.
No. This page has the complete, tested code (macropad.ino).
About ₹704 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
USB HID devices; Sending key combinations; Native USB on the ESP32-S3.
Do not store passwords as macros; anyone can press the button.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.