Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: LED Countdown & USB Button  (Read 1550 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

This is my first post on these forums. I'm a total noob, but I'm learning a lot from poking around and reading.

What I'm trying to build is a USB button that will trigger a computer keystroke ("F4" for example) as well as a LED animation.

Essentially, when a user presses the button, I want the button to tell the computer to press "F4" then trigger a countdown light made up of LED lights.

This is the button I'm thinking about using:


http://www.etsy.com/listing/81313651/custom-color-big-light-up-usb-button?ref=pr_shop


And this is a similar animation I want the LEDs to do upon button press:



The LEDs will be arranged in a circle (approximately 12 inches in diameter). When the button is pressed the LED ring will start lighting up clockwise. Ideally, 'd want to be able to program the amount of time it takes for the LED ring to light up 2 seconds, 5 seconds, 10 seconds, etc...

Again, I'm just starting to dive into Arduino so I apologize again for not being very well versed on this subject.

If anyone can give me any information or point me in the right direction, that would be awesome.

Thanks so much in advance!
Logged

0
Offline Offline
Faraday Member
**
Karma: 26
Posts: 3525
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Blinking LEDs is exhaustively demonstrated on my website http://www.blinkenlight.net. I also have several examples how to implement the Larson scanner effect you want to achieve.
Logged

Check out my experiments http://blog.blinkenlight.net

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

Quote
What I'm trying to build is a USB button that will trigger a computer keystroke ("F4" for example)
This is not a project for a self confessed "total noob".
It could be tackled in two ways:-
1) Make a USB host shield and write an HID host keyboard adapter sketch. Not an easy thing.
2) Have an other program running on the PC that looks at the serial port and injects characters into the input buffer when it receives them from the arduino.
Logged

0
Offline Offline
Faraday Member
**
Karma: 26
Posts: 3525
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I thought this is a very easy project.

My approach would be:

1) Arduino + Blinkenlight code for the LED effect
2) Keyboard controller out of old keyboard for sending F4
3) A button that will trigger both at the same time

Logged

Check out my experiments http://blog.blinkenlight.net

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

Quote
2) Keyboard controller out of old keyboard for sending F4
Well he did say:-
Quote
computer keystroke ("F4" for example)
Which implies he is wanting to send more than one key press.
Logged

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

Blinking LEDs is exhaustively demonstrated on my website http://www.blinkenlight.net. I also have several examples how to implement the Larson scanner effect you want to achieve.

Thanks so much! I'll look into your site and do some more research.
Logged

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

Quote
2) Keyboard controller out of old keyboard for sending F4
Well he did say:-
Quote
computer keystroke ("F4" for example)
Which implies he is wanting to send more than one key press.

I'm only trying to trigger one computer keystroke at a time, but wanted the option to change the keystroke if needed. Thanks for your help!
Logged

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

Quote
but wanted the option to change the keystroke if needed
Well that option would involve soldering two wires across a key and you would have to change the soldered wires to change the key.
Logged

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

Quote
but wanted the option to change the keystroke if needed
Well that option would involve soldering two wires across a key and you would have to change the soldered wires to change the key.

What about something like this?

http://blog.makezine.com/archive/2011/04/the-awesome-button.html
Logged

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

Yes that looks like it has most of the ingredients for your application.
Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: