NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Turn on lights with the push of a button

October 28, 2011
by Pew446
Pew446's Avatar

Hey everyone, I've been wanting to do this project for a long time now, what if we could make a program where you push a key on your keyboard, a specific key for each light, for example, A could be used to turn on your desk lamp by sending the byte of data '01000001' to the Arduino, which turns on the right light by using a SSR? Just a thought. This would be a fun project if someone would like to help me find somewhere to start. :)

October 29, 2011
by Rick_S
Rick_S's Avatar

Ooh, you said the A word in the Nerdkit forum Eek

Fun aside, this is easily done. Here is a sample framework for a project like that.

First, you would have to setup a method of communication between your micro-controller and the PC. This would typically be a serial connection. Samples of code for serial communication can be found in some of the code examples or tutorials (led array for one). You would also need an application on your computer to send the serial data. This could be a simple terminal program like putty or a custom written program if you do that sort of thing.

Next, you would take that data from the PC, parse it in the microcontroller and toggle output pins to drive the SSR's on or off.


October 29, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Pew,

Rick is absolutely correct, and gave you alot of great information on where to start. What I would tell you is that you already know how to do at least half of the things you need to do for this project (by just going through the NerdKits Guide). Yu can do serial communications with the chip, and you know how to set pins on/off usign your switch. Check out our Servo Squirter video for more on doing serial communications from your computer out to your NerdKit.

Keep up updated on your progress!


October 29, 2011
by Pew446
Pew446's Avatar

Thanks guys! I'll keep you updated :)

Post a Reply

Please log in to post a reply.

Did you know that a piezoelectric buzzer can be used to play music with your microcontroller? Learn more...