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 |
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 |
Ooh, you said the A word in the Nerdkit forum 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. Rick |
October 29, 2011 by hevans (NerdKits Staff) |
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! Humberto |
October 29, 2011 by Pew446 |
Thanks guys! I'll keep you updated :) |
Please log in to post a reply.
Did you know that LEDs (light emitting diodes) only conduct current in one direction, like normal diodes? Learn more...
|