I am new to working with Arduino. I’ve seen videos online of what I would like to do but never all off the same Arduino Uno. I was wondering what all is possible off of one of these micro controllers.
Need.
Servo- start Gate
Timer- auto start - led light /photo shut off
LED - Display read out of time
If someone could point me in the direction of how to best go about this and what all would be needed besides the hardware noted above.
It is very unlikely that you will find a project exactly like yours to copy. You can find the parts and play with them until you understand each one. Then it is much easier to put the parts together to realize the final project.
Servo- start Gate
Search for "arduino servo" almost 20 million hits.
Can you make the Servo move using the example code in the Servo library?
Photoresistors are slow. Photo diodes and photo transistors are way faster.
When the car starts, save the start time using millis. When the car goes by the finish, save millis() to end time. The elapsed time is end - start.
In my opinion the hd4780 library is the best library for those displays. Install the library through the library manager of the IDE. I would recommend a LCD with an I2C interface. Much easier and uses only 2 pins.
It's pretty simple, thanks to millis(). Just record the value of millis() when the first cell triggers, wait for the second trigger and record millis() again. Subtract. Go for coffee...
You need to consider much more carefully the detail you put into descriptions so they are unambiguous.
The piece I have quoted suggests to me that the timer starts, the time ends and then something is done with the photo resistor.
Taking the time and expending the effort to write a full project description at the beginning saves a huge amount of time later on. We are now about 12 hours after your Original Post without any sign of progress whereas if you had written a full description at the start you could well have most of the solution now.
Robin
Thanks for the feedback.
You actually were able to pick up my project from my post.
I’m not looking for someone to do the work. Moreso I’ve seen a lot of these online with hotwheel/derby tracks and no one really breaking one down. Especially using photo resistors instead of buttons to start/stop. I have a very general understanding and wanted to see a similar set up on a breadboard to make sure I’m on the right path and now just looking to get this thing working.
I have a photo resister to start time.
Photo resistor to end time.
I would like to display these times on my lcd1602
“Quote”
“Time 0.000”
Thank you for taking the time and any direction you can point me is appreciated.
The lovely Lady Ada has a useful tut on ldrs here.
You might want to look at the state change detect tutorial: in principle, an ldr going from whatever reading is "light" for you, to "dark" for you, is no different than a button being pressed.
So when the start ldr sees a change from light to dark, capture the start time; same at the other end for finish.
Best lcd library is hd44780 by Bill Perry: install that from the ide at Sketch, Include library, Manage libraries and get your lcd working with a "hello world" before trying to print the times.
twinkleyan:
The lovely Lady Ada has a useful tut on ldrs here.
If the OP just wants to detect an ON or OFF signal the LDR can be wired like in the Adafruit analog example and read using digitalRead(). With a suitable choice of fixed resistor it should give a very reliable HIGH or LOW depending on whether it is covered or not. I have found a 68k resistor to be a good choice. IIRC high values make it work better in lower ambient light.
Reason is, the thread I answered had an ldr at the start which in my mind captured the time at which the runner or car or block on a conveyor or whatever went past. But the other thread had a servo as a start gate to allow cars to cross the start line: in my mind that would need a start-person to press a button to open the gate and there would be no need for an ldr at the start.
So it could be that the OP is actually working on two projects. OP might like to clarify if it is two projects, or if it's one how it works with a start ldr and a start gate at the start.