NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Simple Foot Mouse Buttons (Use Switches To Click Events On PC)
August 23, 2009 by Nerdful_com |
In this demonstration I will give you source code (NerdKit AVR & Visual Basic 6) and information on how to make your own mouse clicker (could be programed to do anything on PC from opening programs to running macros) for your PC. I am making this project as my hands hurt (carpal tunnel syndrome and repetitive stress injuries from 12 years of software & web programming) and I plan to use my feet to do mouse clicks (scrolling later and other features are up to you) as I find them the most painful. First we hook up 4 push momentary on buttons or pressure switches (can be as basic as 2 wires that are spring loaded and pushed to make contact and auto releases) from PC0 to PC3 (PC0 = left click , PC1 = right click , PC2 = middle click , PC3 = double clicker). Here's the script for the MCU:
For the VB software (program that watches for serial port calls and responds accordingly), you will need to add component Microsoft Comm Control and you will need to add module MouseCommands.bas to your project. This VB code can be easily made to run macros, VBscripts, DOS prompt commands, open programs, send keystrokes, go to a web page, send queries to other devices and so many other ways your computer can interact! Here is the VB6 source code:
|
---|---|
August 23, 2009 by Nerdful_com |
Basically I am making input devices for handicapped & disabled people (or those concerned about RS). FooTime is a product I own (my wife paid 150 dollars for it but here we can eventually make it for much less) and so far I have basically maade (above codes) a 4 button version without a mouse you move around (I find this bothers my knees anyhow). Even USB pedals and big button switches are like $50 and up (you only get one or two buttons). FooTime webpage: www.bilila.com/foot_mouse_slipper_mouse DETIALS: In addition to its wide applications in ergonomics, rehab, assistive technology, clean room (lab), dirty room (car repair), cyber room (video game), etc, Footime foot mouse is also a very powerful input device for audio/video editor, animator, graphic designer, architect, composer, arranger, product designer (CAD, etc), CT scanner, software programmer or any intensive computer user. |
August 23, 2009 by Nerdful_com |
HERE is one of the first videos of the 2 button demo version (before I made it 4 buttons). I will be adding more buttons, a scroll wheel and other feautres in the future. You will notice that the 2 switches are just cheap disposable paperclips that are pushed to make contact (spring loaded button effect, I do not have enough real buttons yet) on a Canadian copper penny that goes to ground (GND). In the video we have 2 homemade buttons, left paperclip goes to PC0 and the right one goes to PC1 on the MCU. |
Please log in to post a reply.
Did you know that interrupts can be used to trigger pieces of code when events happen? Learn more...
|