How do i use the sensor? Can it actually read barcodes? Is there barcodes to download? Can i use it to tell the robot where to stop on a line following track?
'Sorry; I guess it's a little bit hidden. The file barcodes.pdf is part of the GUI installation (S2GraphicalUserInterfacev1.3.2.zip on the product page). After installation, it exists in the Help subdirectory of the installation directory and can be accessed via the GUI's help screen where it discusses the barcode sensor.
Phil, Thanks! There they are, right on my laptop this whole time :thumb:. I am looking at starting my daughter with my Scribbler 2 and she is fascinated with barcode scanners, so this is a good way to catch her interest.
EDIT: The help file explains the Barcode Sensor function very well. Just thought I would mention that for others.
Hmm. Let's talk a little more about the S2's barcode sensing ability. You see, this robot is quickly becoming popular for middle school robotics programs and I've been running a couple of classes for teachers. This is one of those capabilities to show them right when they think they've seen it all. These are the questions that come to mind:
Is the best way to use the barcode sensing ability with a line follower and maze, putting the barcodes at the end of the line?
Could we print bar codes on easy-to-remove sticky labels so a maze could be reconfigured?
How about using the barcodes to change behavior? We're in a line-following mode until we encounter a certain barcode, then we're in an obstacle avoidance mode or light follower mode. A fairly complex "maze" could be set up, couldn't it?
Maybe use the barcodes to trigger different songs?
Phil, where's the best place to get the native graphic files of the barcodes in case I want to print them on stickers?
1. Combining line following and barcode scanning can be tricky, since both use the same sensors. The tricky part is establishing a cue to switch from following to scanning. IOW, you could say that if the line disappears altogether, switch to scanning. But a disappearing line may also mean that you've strayed off of it and need to recover. In the latter case, though, you might get a warning: i.e. first one sensor leaves the line, then the other. If both leave the line at once (e.g. if you add a small "T" to the end of the line) that may provide the necessary cue -- depending upon how good the line following is in the first place.
2. Sure. Just don't make the labels smaller. The current size and line-spacing are optimized for the S2's sensor resolution.
Phil,
That's very interesting, but makes perfect sense. The symbology doesn't appear to be a standard format like Code 39 or 128; are you using a custom symbology for the barcode?
In your example graphic, here are my assumptions as to what will happen; are they correct?
Scribbler line sensors travel up the line to the small triangled end and due to the triangle, should see the whitespace at the same time as the scribbler attempts to self center over the widening line.
The whitespace hit evenly across the sensors would be the trigger event for the code to stop the line following sequences and kick off the barcode reading sequences.
Upon successful reading of a barcode, the scribbler continues forward.
The large triangled end at the start of the line ensures the scribbler will "find" the line again, regardless of any sloppiness that occurred in it's drive across the barcode.
As the larger triangle reduces in width, the scribbler centers itself back onto the line.
Yes, the "symbology" is custom, optimized for the Scribbler. As to your points 1-5, yes, that's the correct interpretation, except for #1, which I would read as:
1. S2 line sensors travel up the line to the small triangled end. Because of the widening line, both sensors see dark, and the program assumes it's centered on the line until, boom! both sensors see light. IOW there's an instant transition from dark-dark to light-light, rather than dark-dark -> dark,light -> light,light. This is the signal to begin looking for a barcode.
Comments
The second and third links are the ones I'd suggest.
PhiPi will appear sooner or later, probably when the sun goes down in the far NW corner of the USA.
http://forums.parallax.com/showthread.php/135415-Scribbler-2-barcode-sensor
BTW, the barcodes referred to are the special ones provided as PDFs on the S2 product page. UPC codes will not register!
-Phil
-Phil
EDIT: The help file explains the Barcode Sensor function very well. Just thought I would mention that for others.
- Is the best way to use the barcode sensing ability with a line follower and maze, putting the barcodes at the end of the line?
- Could we print bar codes on easy-to-remove sticky labels so a maze could be reconfigured?
- How about using the barcodes to change behavior? We're in a line-following mode until we encounter a certain barcode, then we're in an obstacle avoidance mode or light follower mode. A fairly complex "maze" could be set up, couldn't it?
- Maybe use the barcodes to trigger different songs?
- Phil, where's the best place to get the native graphic files of the barcodes in case I want to print them on stickers?
Barcodes everywhere.1. Combining line following and barcode scanning can be tricky, since both use the same sensors. The tricky part is establishing a cue to switch from following to scanning. IOW, you could say that if the line disappears altogether, switch to scanning. But a disappearing line may also mean that you've strayed off of it and need to recover. In the latter case, though, you might get a warning: i.e. first one sensor leaves the line, then the other. If both leave the line at once (e.g. if you add a small "T" to the end of the line) that may provide the necessary cue -- depending upon how good the line following is in the first place.
2. Sure. Just don't make the labels smaller. The current size and line-spacing are optimized for the S2's sensor resolution.
3. Yes. But see #1 for the caveats.
4. Absolutely.
5. The original CorelDraw file is attached below.
-Phil
-Phil
That's very interesting, but makes perfect sense. The symbology doesn't appear to be a standard format like Code 39 or 128; are you using a custom symbology for the barcode?
In your example graphic, here are my assumptions as to what will happen; are they correct?
- Scribbler line sensors travel up the line to the small triangled end and due to the triangle, should see the whitespace at the same time as the scribbler attempts to self center over the widening line.
- The whitespace hit evenly across the sensors would be the trigger event for the code to stop the line following sequences and kick off the barcode reading sequences.
- Upon successful reading of a barcode, the scribbler continues forward.
- The large triangled end at the start of the line ensures the scribbler will "find" the line again, regardless of any sloppiness that occurred in it's drive across the barcode.
- As the larger triangle reduces in width, the scribbler centers itself back onto the line.
Sound good?Yes, the "symbology" is custom, optimized for the Scribbler. As to your points 1-5, yes, that's the correct interpretation, except for #1, which I would read as:
1. S2 line sensors travel up the line to the small triangled end. Because of the widening line, both sensors see dark, and the program assumes it's centered on the line until, boom! both sensors see light. IOW there's an instant transition from dark-dark to light-light, rather than dark-dark -> dark,light -> light,light. This is the signal to begin looking for a barcode.
-Phil
Go Ken Go!