USB Circuit Python Controllers

In this guide, we'll build a USB foot switch controller. This can be used as an addition to your keyboard or as a way to free up your hands. I'm using it to do overhead photography so I can trigger the camera and use my hands at the same time.

It’s powered by Adafruit’s Trinket M0 which is a tiny microcontroller that can run CircuitPython. Just connect over USB and load it as a flash drive. All of the code and libraries are accessible on the drive so you can make small edits and iterate quickly. The Adafruit HID library simulates USB devices so it can send keypress just like a mouse and keyboard.

Prerequisite Guides

If your new to electronics and soldering, I suggest walking through the following guides to get the basics. The Adafruit Excellent guide to soldering will walk you through process of learning how to use a soldering iron to make solid electrical connections.

Electronic Components

The Trinket M0 and Foot Switch are the main electronic components used in this project.

1 x Trinket M0
Adafruit Trinket M0 with CircuitPython
1 x Micro Switch
Premium Zippy 3-Terminal

Hardware and Supplies

Just a few screws, wires and some handy supplies. 

4 x M2.5 x .45 x 5mm
Metric Flat Head Phillips Machine Screws
2 x #4-40 x 5/8"
Imperial Flat Head Phillips Machine Screws
1 x 26AWG Wire
Silicone Cover Stranded-Core Wire - 25ft
1 x Solder Wire
Solder Spool - 1/4 lb SAC305 RoHS lead-free / 0.031" rosin-core - 0.25 lb / 100 g
1 x Heat Shrink Tubing
Multi-Colored Heat Shrink Pack - 3/32" + 1/8" + 3/16" Diameters
1 x Spring Kit
Spring Kit

Cool Tools!

These help make the project a smooth building experience. You don't need them all of them, but I recommend them.

1 x Wire Strippers
Hakko Professsional Quality 20-30 AWG Wire Strippers - CSP-30-1
1 x Wire Cutters
Flush diagonal cutters - CHP170
1 x Soldering Iron
Adjustable 30W 110V soldering iron - XY-258 110V
1 x Panavise
Panavise Jr. - PV-201
1 x Helping Third Hands
Helping Third Hand Magnifier W/Magnifying Glass Tool - MZ101
1 x Ultimaker 2+
3D Printer

This guide was first published on Mar 21, 2018. It was last updated on Mar 01, 2024.

This page (Overview) was last updated on Mar 11, 2018.

Text editor powered by tinymce.