Introduction: Pedal Controller
We are about to create a custom USB HID device with a Digispark board.
An USB device can act as a keyboard to send key strokes, or act as a mouse, depending on your needs.
The Digispark is like a small brother of the Arduino, but it is especially useful to build cheep USB devices.
In this tutorial we are going to build a pedal device, that acts as a mouse, to send mouse clicks with your foot.
Step 1: Required Parts
- Digispark board $1.25
- Pedal $2.30 (Search for: AC 250V 10A SPDT NO NC Antislip Power Foot Pedal Switch Black JL)
- Potentiometer: $0.30 (can be any kind with 3 legs between 100Ω to 100KΩ)
- Cable laying around
- A small box laying around *
Total costs is: $4
* - I have printed my own case for this project.
Step 2: Printing the Case [optional]
You can print out the top cover according to my design.
You will need to mount the Digispark board on a piece of hard wood (dimensions 27x28x12mm). This will add some weight for the box, so it is less likely to tip.
Step 3: Connecting the Pedal
To disassemble the pedal, we need to loosen the screw and push out the shaft.
It comes with a useless piece of wire, that can be easily replaced with our cable with the appropriate length.
Basically any kid of wire can be used as it is a low voltage device.
Step 4: Soldering the Circuit
We can now solder the circuit according to the schematic provided here.
Now the case can be closed.
Step 5: Upload the Code
Before uploading the code we need to follow the steps provided by Digistump:
After this done, the code can be uploaded to the device. (Code attached here!)
Of course you can modify the code to your needs, as mentioned before, even keyboard events can be performed.
For further details please visit the video linked!
(Also, please SUBSCIBE to my YouTube channel, as because of new requirements my channel will be likely to be demonetized without your help. Thanks!)
We have a be nice policy.
Please be positive and constructive.