User and technical documentation for the RB Switch
The production sketch is:
firmware/RB_SWITCH_firmware/RB_SWITCH_firmware.ino
The sketch is self-contained and does not require a project-specific header file.
For firmware maintenance, install:
No touch-sensor, proximity-sensor, NeoPixel, or separate project-specific HID library is required.
For the production ESP32-S3 module, select:
ESP32 Arduino → ESP32S3 Dev Module
Use the board settings required by the exact production module.
The board has no separate USB-to-serial chip. USB-C connects directly to the ESP32-S3’s native USB (D− on GPIO19, D+ on GPIO20), so firmware is uploaded and the Serial Monitor is read over that same connection. In the Arduino IDE Tools menu, set USB CDC On Boot to Enabled if you want Serial output to appear in the Serial Monitor.
RB_SWITCH_firmware.ino.If the upload fails or no serial port appears, see Troubleshooting.
Open the Serial Monitor at 115200 baud. The firmware reports the three button mappings and logs button activity with its GPIO and HID usage ID. It also prints BLE connected and BLE disconnected; restarting advertising, and Key ignored: BLE not connected when a button is pressed with no host connected. The full expected output is in Troubleshooting.
The board also has a battery-voltage divider on GPIO5 (VBAT ÷ 2) and a charge-status LED (D1) driven by the charger. The production firmware does not read GPIO5 and reports a fixed 100% battery level. See Hardware for the full pin map.
| Function | HID Usage ID |
|---|---|
| Enter / Return | 0x28 |
| Right Arrow | 0x4F |
| Left Arrow | 0x50 |
ESP_PWR_LVL_P9).For remapping keys, changing debounce timing, renaming the device, or other customization of RB_SWITCH_firmware.ino, see Firmware Customization.