Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apob-100/miniautokeyboard
MiniAutoKeyboard is a CircuitPython script designed for the Adafruit Rotary Trinkey with the ATSAMD21E18 32-bit Cortex M0+ SoC. The rotary encoder can be used to select a numbered *.txt file on the CircuitPython USB flashdrive of the Trinkey and output them as a regular USB HID device (e.g. a keyboard).
https://github.com/apob-100/miniautokeyboard
adafruit adafruit-neopixel autokeyboard circuitpython cortex-m0plus hid keyboard samd21 trinkey usb-hid
Last synced: 14 days ago
JSON representation
MiniAutoKeyboard is a CircuitPython script designed for the Adafruit Rotary Trinkey with the ATSAMD21E18 32-bit Cortex M0+ SoC. The rotary encoder can be used to select a numbered *.txt file on the CircuitPython USB flashdrive of the Trinkey and output them as a regular USB HID device (e.g. a keyboard).
- Host: GitHub
- URL: https://github.com/apob-100/miniautokeyboard
- Owner: ApoB-100
- License: agpl-3.0
- Created: 2023-11-26T16:19:57.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-15T12:46:52.000Z (11 months ago)
- Last Synced: 2024-10-10T22:41:33.761Z (about 1 month ago)
- Topics: adafruit, adafruit-neopixel, autokeyboard, circuitpython, cortex-m0plus, hid, keyboard, samd21, trinkey, usb-hid
- Language: Python
- Homepage:
- Size: 861 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MiniAutoKeyboard
MiniAutoKeyboard is a CircuitPython script designed for the [Adafruit Rotary Trinkey](https://learn.adafruit.com/adafruit-rotary-trinkey/overview) with the [ATSAMD21E18 32-bit Cortex M0+ SoC](https://www.microchip.com/en-us/product/atsamd21e18). The rotary encoder can be used to select a numbered *.txt file on the CircuitPython USB flashdrive of the Trinkey and output them as a regular USB HID device (e.g. a keyboard).
## Features
1. **Text File Selection via Rotary Encoder**: Utilizes rotary encoder to scroll through and select numbered `.txt` files stored on the CircuitPython USB flash drive of the Trinkey. The NeoPixel LED will flash x times based on the file number currently selected.
2. **Automated Text Typing**: Once a `.txt` file is selected, pushing the switch on the rotary encoder triggers the script to type out the contents of the selected text file to the connected device, emulating a regular USB HID device like a keyboard.
3. **USB HID Device Emulation**: The script emulates keyboard inputs, allowing the typed contents to be inputted to any device that recognizes standard USB keyboards.
4. **Customizable Keyboard Layout**: Comes pre-configured for the Central European QWERTZ keyboard layout but can be adapted for other keyboard layouts, offering flexibility in different regional settings.
5. **Line ending agnostic**: The script can handle all types of line endings used by different OS.## Instructions
### Installation Instructions
1. **Flash CircuitPython onto the Trinkey**:
- Visit the [CircuitPython Download page](https://circuitpython.org/board/adafruit_rotary_trinkey_m0/) and download the latest version of CircuitPython for the Adafruit Trinkey Rotary.
- Connect the Trinkey to your computer via USB.
- Double-press the reset button on the Trinkey to enter the bootloader mode.
- A drive named `BOOT` should appear on your computer.
- Drag and drop the `.uf2` file you downloaded onto this drive.
- The Trinkey will reboot and a new drive named `CIRCUITPY` should appear.2. **Copy Required Libraries**:
- Create a folder named `lib` on the `CIRCUITPY` drive.
- Copy the following libraries into this folder:
- `adafruit_hid` (folder)
- `keyboard_layout_win_de.py`
- `keycode_win_de.py`### Usage Instructions
1. **Adding and Editing Text Files**:
- Connect the NeoTrinkey to your computer.
- It will appear as a USB flash drive named `CIRCUITPY`.
- Create and save `.txt` files on this drive, naming them numerically (e.g., `1.txt`, `2.txt`, etc.).
- You can edit these files directly on the drive using any text editor.2. **Using the Script to Type Out Text Files**:
- Connect the Trinkey to your computer.
- Turn the rotary encoder to select a file based on its number.
- The NeoPixel LED will flash x times based on the file number currently selected.
- Press the switch on the Trinkey to start typing out the contents of the selected `.txt` file as keyboard input.### Required Libraries
To run this script on the Adafruit Trinkey Rotary, the following libraries need to be available in the CircuitPython environment:
- `board`
- `touchio`
- `rotaryio`
- `usb_hid`
- `neopixel`
- `digitalio`
- `time`
- `adafruit_hid.keyboard`
- `keyboard_layout_win_de`
- `keycode_win_de`Ensure these libraries are included in your `lib` folder on the Trinkey.
## License
This script is distributed under the Affero General Public License (AGPL). The AGPL license ensures that all modifications and derived works based on this script are also open source and distributed under the same terms. For more information about the AGPL license, please visit [GNU's AGPL License page](https://www.gnu.org/licenses/agpl-3.0.html).