Go Down

Topic: Pressing that button (Read 543 times) previous topic - next topic


Jun 23, 2011, 05:38 pm Last Edit: Jun 23, 2011, 06:28 pm by acm01 Reason: 1
Hey guys,

I was told an arduino might be of use to me so here goes! Basically I need to repeatedly press a button on a keyboard, but the timing between each press and release is different (e.g. press for 0.12s, release for 2.3s, press for 0.31s, release for 2.1s). I'd like to be able to set about a thousand values and then be able to leave it to run by itself. Or if possible, make a circuit that chooses a values between 2 set values (i.e. will pick a different number between 1 and 2 seconds each time). I think that's explained adequately but if not give me a shout!

Thanks in advance


If you just want to do it hacking into an existing keyboard it is easy just wire up an analogue switch ( a 4066) across the keypad and control that open and closed with the arduino. You need to common the grounds between arduino and keyboard.


Excellent, doesn't sound too hard, thanks! I figure I just need to work out the arduino code now? Sorry if that's a stupid question, never heard of an arduino before a few days ago!

Thanks again


digitalWrite(pin, HIGH);
to press the key and
digitalWrite(pin, LOW);
to release it.
Where pin is the number of the pin you have the analogue switch connected to.

Go Up