Skip to content

Instantly share code, notes, and snippets.

@waltercassiano
waltercassiano / README.md
Created July 31, 2024 12:52 — forked from manuelbl/README.md
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@waltercassiano
waltercassiano / adb_shell_inputs.sh
Created May 20, 2021 01:34 — forked from kibotu/adb_shell_inputs.sh
amazon-fire-tv-remote-input using adb
#!/usr/bin/env bash
# * https://developer.android.com/reference/android/view/KeyEvent#constants
# * https://developer.amazon.com/appsandservices/solutions/devices/fire-tv/docs/amazon-fire-tv-remote-input
# * ----------------------------------------------------------------------------------------------------
# * | | (KEYCODE_MEDIA_RECORD) | |
# * ----------------------------------------------------------------------------------------------------
# * | |
# * ----------------------------------------------------------------------------------------------------
# * | | KEYCODE_DPAD_UP | |
@waltercassiano
waltercassiano / firebase-backup.sh
Created December 4, 2018 23:15 — forked from crrobinson14/firebase-backup.sh
Firebase Realtime Database Backup Script
#!/us#!/usr/bin/env bash
# This script uses a shallow-get technique to get a list of all top level keys
# in a Firebase Realtime Database, then extract the tree under each key into a
# separate JSON file, one per top level key.
#
# It’s great for making backups because you don’t end up with one ginormous
# export file which is really hard to manage with other tools.
#
# It can also immediately give you a sense of where your space is going per key,