Pages: [1]   Go Down
Author Topic: Pressing that button  (Read 436 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: June 23, 2011, 11:28:18 am by acm01 » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: