LED to show laser alignment.

Dear all.

I am currently making a laser speed trap to measure egg race contraptions at my school.

Using laser diode with photodiode sensors on inputs 2 and 3.

All is working well, but I would like to write into the code a visual (LED) sign that the sensor are each aligned. And more importantly when they become misaligned.

I have tried to write in if digital read etc at the beginning of the loop, but it either does not compile the LED remains on even if I move the sensor out of alignment.

Any help gratefully received.

Regards

Jon

CHRONO_sketch_from_Arduino_site.ino (1.27 KB)

Can you please supply a picture showing how the laser is set up so we can see how it is aligned.

Weedpharma

Pic attached

Lasers are independent of arduino to save trailing wires, coding etc

cannot have a gantry as vehicles maybe too high

many thanks for your help.

Jon

Pic attached (RESIZED)

Lasers are independent of arduino to save trailing wires, coding etc

cannot have a gantry as vehicles maybe too high

many thanks for your help.

Jon

The problem is going to be how do you tell if the lack of signal is due to obstruction or misalignment.

I would use a timer that would alarm if the lack of signal was longer than the expected time due to object passing through.

Weedpharma