Coder Social home page Coder Social logo

apob-100 / miniautokeyboard Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 882 KB

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).

License: GNU Affero General Public License v3.0

Python 100.00%
adafruit adafruit-neopixel autokeyboard circuitpython cortex-m0plus hid keyboard samd21 trinkey usb-hid

miniautokeyboard's Introduction

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).

Features

MiniAutoKeyboard Logo

  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 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.

miniautokeyboard's People

Contributors

apob-100 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.