This is a simple AT Switch Interface based on the ATMakers PCB design and a Feather Trinket M0
This allows keystrokes to be sent to a PC, MAC, or any USB HID central device based on the code and configuration files on the Trinket device itself.
This is a CircuitPython project and many thanks to Adafruit and its staff and community for their help.
- Download the necessary files from KeySwitch github repository.
- Visit KeySwitch github repository at https://github.com/ATMakersOrg/KeySwitch
- Click on “Clone or download” button” in green.
- Click on “Download Zip” to download the necessary file.
- Extract “KeySwitch-master.zip” to the directory of your choice.
- Tap the reset button twice to enter the bootloader. If it doesn't work on the first try, don't be discouraged. The rhythm of the taps needs to be correct and sometimes it takes a few tries.
- The name of the drive will change from CIRCUITPY to TRINKETBOOT.
- Drag and drop the KEYSWITCH_TRINKET.uf2 file to TRINKETBOOT drive.
- The name of the drive will change back from TRINKETBOOT to CIRCUITPY.
- The led color should now change to blue to indicate color of the first mode.
-
Download the latest version of CircuitPython (Version 5.0) for Adafruit Trinket M0 called something similar to adafruit-circuitpython-trinket_m0-en_US-5.0.0.uf2 file from https://circuitpython.org/board/trinket_m0/
-
Example: Download adafruit-circuitpython-trinket_m0-en_US-5.0.0-beta.4.uf2 file from https://circuitpython.org/board/trinket_m0/
-
Download drivers if you are using windows 7. You will not need to install drivers on Mac, Linux or Windows 10. https://github.com/adafruit/Adafruit_Windows_Drivers/releases/download/2.3.4/adafruit_drivers_2.3.4.0.exe
-
Tap the reset button twice to enter the bootloader. If it doesn't work on the first try, don't be discouraged. The rhythm of the taps needs to be correct and sometimes it takes a few tries.
-
The name of the drive will change from CIRCUITPY to TRINKETBOOT.
-
Drag and drop the adafruit-circuitpython-trinket_m0-en_US-5.0.0.uf2 file to TRINKETBOOT drive.
-
The lights should flash again, BOOT will disappear and a new drive will show up on your computer called CIRCUITPY.
-
Now you can just change the code.
- Download the necessary files from KeySwitch github repository.
- Visit KeySwitch github repository at https://github.com/ATMakersOrg/KeySwitch
- Click on “Clone or download” button” in green.
- Click on “Download Zip” to download the necessary file.
- Extract “KeySwitch-master.zip” to the directory of your choice.
-
Drag and drop lib library files from extracted “KeySwitch-master” folder in lib file under CIRCUITPY drive.
-
The structure of lib directory:
-
lib
- adafruit_dotstar.mpy
- adafruit_hid
- init.py
- Keyboard.mpy
- keyboard_layout_us.mpy
- keycode.mpy
- mouse.mpy
-
Drag and drop following files from extracted “KeySwitch-master” folder to CIRCUITPY drive:
- main.py
- mode.py
- settings.py
- README.md
-
You may need to press reset button to make it start functioning.
Press and hold switch 5 to switch modes.
Modes | Switch actions | Led Color |
---|---|---|
Scanning | 1 ONE 2 TWO 3 THREE 4 FOUR 1,2 FIVE | #0000FF (Blue) |
Common | 1 SPACE 2 ENTER 3 LEFT_CLICK 4 RIGHT_CLICK | #FF0000 |
Mouse | 1 MOUSE_LEFT 2 MOUSE_RIGHT 3 MOUSE_UP 4 MOUSE_DOWN | #00FF00 |
Arrows | 1 UP_ARROW 2 DOWN_ARROW 3 LEFT_ARROW 4 RIGHT_ARROW | #FF00FF |
Browser | 1 SPACE 2 TAB 3 SHIFT+TAB 4 PAGE_DOWN | #FFFF00 |
- settings.mpy file can be edited to change the modes and functionality of switches