Shop OBEX P1 Docs P2 Docs Learn Events
count input — Parallax Forums

count input

ArchiverArchiver Posts: 46,084
edited 2002-11-08 08:22 in General Discussion
Can anybody tell me the best way and most reliable way to count A white line on
a black background using Asmall send recive fiberoptic head and amp.
At present time I am using code like this
if in5 = 0 then run mtrs 'pulse servo mtrs
pos = pos + 1 'increment line count
wh: if in5 = 1 then wh ' wait here for travel past line
run mtrs ' pulse servo motors
this code seems to work although it makes wheel motors kind of jerkey as the
robot cross's A line
the sensor head is approx. 1/8 " in diam and I made the lines approx 1/8" wide.
is there A better way to code this maybe like using count?
thanks any info will be appreciated
max


[noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.