Sign up ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

I have a question regarding the programming of printing text on the screen after an LED lights up on a breadboard. Should we plug in the LED into the Arduino board or a regular breadboard? How do I get the Arduino to recognize that the LED has lit up? I am doing a physical game where if you touch the wire with a wand, a buzzer and a LED lights up, which is currently connected as a parallel circuit.

Thank you very much in advance!

share|improve this question

migrated from stackoverflow.com Apr 12 '11 at 22:52

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You don't want your Processing sketch to detect when the LED lights up. Per your description, you are touching a wire with a wand. This wire, which I will assume is some kind of switch, has to go into one of the pins on the Arduino that has been configured as an input. Your Arduino code is then responsible for detecting a change on this input, and then will set the output bit high (or low, if that's how your circuit is set up) to turn on the LED and buzzer. It is this change in the input that you will also use to make the text appear on the screen.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.