Hi Everyone,
This is my first post here, so I hope I do everything right!
My problem:
I made my own small conveyor belt (Stepper motor conveyor belt by ErwinDuif - Thingiverse) and now I want to add a KY-008 laser diode and sensor (https://www.elabpeers.com/ky-008-laser-x-laser-detector.html) to this system so it automatically stops when a object breaks the laser beam.
I'm really a beginner in programming a Arduino so I don't know where to start:
I have the neme 17 working with a easy driver and some basic code, and i can get a value out of the sensor that is 0 for when the beam is broken and 1 if the beam is good.
So the code must be something like:
if laser output = 1, stepper motor run
if laser output = 0, stepper motor stop
But I don't know how to make that in working code
Is there some one that can help me!!
Laser_code.ino (558 Bytes)
stepper_code.ino (237 Bytes)