Subject:
|
Re: how does a bar code reader work?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sat, 1 Jan 2000 13:03:54 GMT
|
Original-From:
|
Andy Gombos <gombos@ne.!ihatespam!infi.net>
|
Reply-To:
|
GOMBOS@NE.antispamINFI.NET
|
Viewed:
|
1242 times
|
| |
| |
On the lego website they have RIS 1.5 programming hints. I just saw that there is a card
reader that scans slips of paper with lines on it. I was thinking that the same idea
could be used for these trains, since lego already has the basic programming done for
you.
Andy
Ralph Hempel wrote:
> Ben wrote:
>
> > This is going to be tricky without real arrays. LegOS may be the only option.
>
> Hmmm, this might be another practical pbForth application. I don't have time
> right now...
>
> <snipped excellent barcode type description>
>
> > Maybe I'll print some Code 39 and see if I can write some NQC to scan it with a
> > light sensor. You'd need a full time counter task to simulate a fast clock.
> > Then you wait for a quiet leading zone and the initial set of light->dark,
> > dark->light, light->dark transitions. This gives you baselines for the pulse
> > widths. Then you measure each set of transitions and decide if you saw a wide
> > or a narrow bar/gap and decode. When you see the end symbol check the checksum
> > and then beep pleasantly at about 1600Hz. :-)
>
> I'm not sure about the clock thing. Any single sensor is sampled at about 333 Hz.
> If you write some pbForth coe to sample in a tight loop, you will get a bit pattern
> which you can then guess the time from. Time is relative anyways, since the scanning
> speed is changed as you drag the pointer across the code...the marker bars at either
> end of the code are there to provide a reference and assume you don't change
> your scan rate too much.
>
> pbForth has access to 10msec timers inside the RCX.
>
> Cheers,
>
> Ralph Hempel - P.Eng
>
> --------------------------------------------------------
> Check out pbFORTH for LEGO Mindstorms at:
> <http://www.hempeldesigngroup.com/lego/pbFORTH>
> --------------------------------------------------------
> Reply to: rhempel at bmts dot com
> --------------------------------------------------------
|
|
Message is in Reply To:
| | RE: how does a bar code reader work?
|
| (...) Hmmm, this might be another practical pbForth application. I don't have time right now... <snipped excellent barcode type description> (...) I'm not sure about the clock thing. Any single sensor is sampled at about 333 Hz. If you write some (...) (25 years ago, 30-Dec-99, to lugnet.robotics, lugnet.trains)
|
11 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|