Type your password effortlessly.
Typing your password, sometimes, can be a pain. For instance, when you dont have a keyboard connected directly to the device you want to access. Or maybe you have a passphrase so large and complex that it is a hassle to type it every time.
THIS PROJECT IS MADE FOR EDUCATIONAL PURPOSES ONLY. USE AT YOUR OWN RISK.
This project is designed for the ATtiny microcontroller (specifically the Digispark/ATtiny85) to implement a passkey system. It acts as a USB keyboard device that automatically types a configured password when plugged in or triggered. This enables secure access control using a simple, compact hardware setup.
- Automated Password Entry: Types a pre-configured password via USB HID.
- Compact Codebase: Optimized for ATtiny microcontrollers.
- Configurable: Password can be set via environment variables.
- Arduino CLI: For building and uploading firmware.
- mise: For task management and tool versioning.
- ATtiny85 / Digispark: The target hardware platform.
- Standard Arduino Libraries:
DigiKeyboardfor USB HID functionality.
- mise: This project uses
miseto manage dependencies and tasks. Install it by following the installation guide. - Hardware: A Digispark or ATtiny85 development board.
-
Clone the repository:
git clone <repo-url> cd attiny-pass-key
-
Install Tools: Run
mise installto download the required version ofarduino-cliand other tools defined inmise.toml.mise install
-
Initialize Environment: Run the setup task to configure the Arduino core and libraries.
mise run setup
This command will:
- Create a
.envfile from.env.exampleif it doesn't exist. - Update the Arduino core and library indexes.
- Create a
-
Configure Password: Open the
.envfile and set your desired password in theATTINY_PASS_KEY_PASSWORDvariable.ATTINY_PASS_KEY_PASSWORD="your_secure_password_here"
This project uses mise tasks to simplify the build process.
-
Compile the Firmware:
mise run arduino:compile
This compiles the sketch and injects the password from your
.envfile. -
Upload to Device:
mise run arduino:upload
Connect your Digispark/ATtiny85 when prompted (or within the 60-second timeout window typical for Micronucleus bootloaders).
-
Monitor (Optional): To view serial output (if enabled/supported):
mise run arduino:monitor
attiny-pass-key.ino: The main Arduino sketch containing the logic.mise.toml: Configuration formise, defining tools and tasks (compile, upload, setup).arduino-cli.yaml: Configuration file forarduino-cli.sketch.yaml: Defines the board profile (FQBN) and platform dependencies..env: Stores sensitive configuration like the password (do not commit this file).
