NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Sensors, Actuators, and Robotics » Game Show Style Buzzer
February 10, 2010 by sjpizzle |
Hi I am in a college class, where we have to do a game show style quiz. I want to be able to give each group a button and whoever pushes it first would have a respective led light up to alert me who buzzed in first. I am thinking of just using 6 leds and 6 buttons, but am not sure how to program it. If/else statements should do it, but I can't seem to be able to figure out how to take input from the buttons and then display output with an led. It sounded easier than it is. I tried using some of the dip arithmetic code to get started but it didn't seem to work right. The led lights up randomly and is not bright at all. Here is the code I have (just the revelant part):
|
---|---|
February 10, 2010 by mrobbins (NerdKits Staff) |
Hi sjpizzle, I think you are on the right track, but the one big piece you might be missing is that once a button is hit, your program should "stop" -- that is, it should stop looking for other button presses! There are two ways you could do this:
Does that make sense? Mike |
Please log in to post a reply.
Did you know that you can use a transistor to interface between different voltage levels of digital logic? Learn more...
|