Shop OBEX P1 Docs P2 Docs Learn Events
Scribbler 2 Barcode Sensor? — Parallax Forums

Scribbler 2 Barcode Sensor?

JordanVJordanV Posts: 4
edited 2013-09-20 14:08 in Robotics
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?


Thank You So Much!

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-19 11:29
    I was going to post some links but all the links I know of are already listed in the "Similar Threads" below.

    The second and third links are the ones I'd suggest.
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2013-09-19 17:24
    Got to be honest but I haven't use it either so I'd like to learn as well.

    PhiPi will appear sooner or later, probably when the sun goes down in the far NW corner of the USA.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-19 20:42
    The two threads cited above should help:

    BTW, the barcodes referred to are the special ones provided as PDFs on the S2 product page. UPC codes will not register!

    -Phil
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2013-09-19 22:21
    Phil, I have scoured the Scribbler page along with the forums and must be blind. Where are the Barcode PDFs that you mention?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-19 23:43
    '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
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2013-09-20 00:26
    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.
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2013-09-20 07:34
    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:
    1. 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?
    2. Could we print bar codes on easy-to-remove sticky labels so a maze could be reconfigured?
    3. 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?
    4. Maybe use the barcodes to trigger different songs?
    5. 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.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-20 10:58
    Ken,

    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 Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-20 11:46
    Here's how I would try to combine line-following with barcode scanning:

    attachment.php?attachmentid=104012&d=1379702782

    -Phil
    273 x 703 - 7K
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2013-09-20 12:51
    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?
    1. 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.
    2. 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.
    3. Upon successful reading of a barcode, the scribbler continues forward.
    4. 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.
    5. As the larger triangle reduces in width, the scribbler centers itself back onto the line.
    Sound good?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-20 13:11
    Andrew,

    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
  • WhitWhit Posts: 4,191
    edited 2013-09-20 14:08
    Good info Phil!

    Go Ken Go!
Sign In or Register to comment.