tom_pay
Member
Hi
I want to build an electronic location sensor for my garage door. I didn't want just an open/closed display, I wanted a 0% to 100% open readout.
I decided I would glue a metal strip with evenly spaced 'teeth' on the sliding door and use a photo interrupter to count the teeth that went by. (see picture)
I have got the counting part sorted out. However the direction of travel has stumped me. How do I know when to add the teeth going by, or deduct them.
Does anyone have any ideas on how to do this?
Thanks
Tom
I want to build an electronic location sensor for my garage door. I didn't want just an open/closed display, I wanted a 0% to 100% open readout.
I decided I would glue a metal strip with evenly spaced 'teeth' on the sliding door and use a photo interrupter to count the teeth that went by. (see picture)
I have got the counting part sorted out. However the direction of travel has stumped me. How do I know when to add the teeth going by, or deduct them.
Does anyone have any ideas on how to do this?
Thanks
Tom