I’m a beginner, I want to design a measuring device with photo interupter sensors, I want to use the photo interupter output to do the distance calculation by racing on the number of pulses that existed on every one wheel rotation. can I help with a program that can be used to calculate the value of the pulse?
this sensor, produce one pulse when blocked by a hitch
it looks like this is the wheel picture I use
this is my project board photo
I combined the sensor and the wheels like this
can I help with a program that can be used to calculate the value of the pulse?
The value of the sensor that detects the light will be either HIGH or LOW, depending on whether it detected light (nothing in the way) or not (the light beam is blocked).
The digitalRead() function will tell you that.
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
Please post your images in your posts, the above link should show you how to do that.