Introduction: Use Foot Switch to Open Linux Terminal
So here is how i made my foot pedal used to start Linux terminal using an Arduino. It's made because I am board of pressing the terminal icon with my mouse.
P.S. Sorry for my English. I am from Croatia.
Tools needed:
-Soldering iron and some solder
-Wire clippers or any other cutting tool
-Screwdriver
Parts needed:
-Arduino system
-Foot switch (I found mine in my workshop)
-Wire
-10k pull-down resistor or you can use one integrated in arduino
-Header connector
Computer with Linux (I am using Debian stable (Sid) with XFCE), python with installed serial and OS module and, of course, the Arduino program.
Step 1: The Pedal Switch
OK, I found mine pedal in my workshop but you can order it on-line for pretty cheap.
First you need to open it and find contacts for the switch.
If you have NC(normally closed), NO(normally opened) and COM(common). Use the NO and COM.
Strip the isolation form the wires off.
Now connect the wires to the NO and COM connectors and close up the casing.
Step 2: Connecting Pedal to the Arduino
First strip the insulation from the other end of the wire. And solder the stripped part of the wire on to the header connector.
Snip the connector into half one connect to pin 8 and other to GND. If you are using external 10 k ohm resistor connect one pin to the pin
8 of the Arduino and second pin to the 5V pin of the Arduino.
Step 3: Computer Part
First install Arduino program, python and python libs.
In Debian type sudo apt-get install arduino python python-serial
Than upload this arduino code to the Arduino. Than open up a terminal console and cd to the location of the foot_pedal.py file. And type python foot_pedal.py
Attachments
Step 4: You Are Done
You are done. Hope it works. Thanks for visiting my instructable.
5 Comments
11 years ago on Introduction
Downloaded your code and will try it with the osepp uno and freebasic (modified of course).
11 years ago on Introduction
This is a great idea! The Fragpedal can handle pretty much any command you can throw at it. $55 for a 2-button and $80 for a 4-button version. Bind any key press, combination, sequence, or configure advanced button behaviors like shifts, press/releases, tap/press/hold buttons, etc
12 years ago on Introduction
Great idea! I am going to do this myself when I have a few minutes of free time. For me though it would be more useful to have the terminal window appear when the pedal is depressed and disappear when it is released. I often find myself needing a terminal for two or three commands, and this would be a great way to "pop in" and "pop out".
Reply 12 years ago on Introduction
yakuake may be handy for that, map it to a key.
12 years ago on Introduction
i used a footswitch years ago for start grabbing videopictures. only need the pedal and used the RS232 port. the code was done in vb and is easy:
simply send a ascii in a loop from pin 2 to pin 3 of the RS232, the footswitch breaks or contact this 2 wires. now you can read out pin 3: are there asciis incoming or not? the result can be used to start or do something - there is no need for more hardware or arduino in my case...the reactiontime of the footswitch was near realtime in my case, a few ms only...