Hi. I'd like to make a air hockey game where in two LDR's are used as input tranducers to count in goals. How do i program the ldr to count in scores separately for players 1 and 2? And display the goals in a led?
Start with one LDR and write a sketch that proves you can detect the hockey puck breaking a lightbeam.
Presumably there are two goals once you have one LDR working you just replicate it for the second goal. Your then just count the goals scored in each.
It is going to be hard to detect own goals so you will probaly need some kind of "ref" button to tell the system the last goal was a home goal.
It is not clear what you mean by displaying the goals in an LED.
You could certainly flash an LED each time a goal was scored.
How do i program the ldr
Do you REALLY have a programmable LDR? I've never seen one.
You program the Arduino to read the LDR. If the LDR becomes blocked when a goal is scored, then if the reading drops below some threshold (ambient light dependent), a goal was scored. Which team gets the credit depends on which LDR's reading dropped.
And display the goals in a led?
An LED is either on or off. How do you propose to show a score of 7 with an on or off light?
Hey noobhelpmeee, what hardware do you actually have?
ardly:
Start with one LDR and write a sketch that proves you can detect the hockey puck breaking a lightbeam.
Presumably there are two goals once you have one LDR working you just replicate it for the second goal. Your then just count the goals scored in each.It is going to be hard to detect own goals so you will probaly need some kind of "ref" button to tell the system the last goal was a home goal.
It is not clear what you mean by displaying the goals in an LED.
You could certainly flash an LED each time a goal was scored.
i tried coding earlier but only one ldr reads and displays the score on led btw its just a simple 5 leds that ights up gradually everytime you goal. i dont know how to make both work.
i tried coding earlier but
failed to share the code, failed to share the schematic, and failed to share the results.
Perhaps you mean LCD.. as in a SCREEN? (not LED?..a light emitting diode)
post your code.. use code tags!