Shop OBEX P1 Docs P2 Docs Learn Events
Scribbler S2 Line Following Question — Parallax Forums

Scribbler S2 Line Following Question

schabotte1schabotte1 Posts: 3
edited 2011-02-04 11:14 in Robotics
Hi,

I was testing the line following demo in the S2.

I printed our the tracks and made a fairly complex layout on my kitchen table and the robot performed on it very well.

I moved it outside to my garage floor and it failed miserably.

A friend suggested that the sunlight coming into the garage may have affected the sensors making it fail.

Does anyone know for sure what could have happened and is there a way to adjust for this effect in the code?

Thanks,
Steven

Comments

  • ercoerco Posts: 20,256
    edited 2011-01-26 16:31
    Lighting & paper/printer variations can make a big difference in readability. Not positive about the S2, but AFAIK the original Scribbler's line sensors were hardware-based and no software calibration was provided.

    Edit: I have it on good authority that S2's line sensors CAN be adjusted in software.
  • BenWirzBenWirz Posts: 63
    edited 2011-02-04 11:02
    Hi Steven,

    The problem is likely the color of your garage floor. If the printed line tracks are placed on a dark surface, the white paper may not reflect enough light. Try placing an extra sheet or two of white paper under the printed tracks and see if it improves.

    The line following trip points can be adjusted, they are just constants in the spin code default program. Look for the following code line at the top of the default.spin file:

    LINE_TRIP = 40

    Note that there is also another way to alter the trip point without recompiling the default program. The codes comments below describe the procedure.

    I hope this helps,
    Ben

    ''The sensitivity of the line sensors can be modified if the S2 has trouble
    ''detecting a particular line. To reduce the sensitivity, hold the S2 in
    ''air while starting the demo with the finger selection method or by
    ''pressing the blue switch 5 times. Spin the small rear idler wheel
    ''until the center LED blinks green. Next place the S2 on the track.
    ''Once the track is detected, the S2 will display the line sensor
    ''state as described above. It is only necessary to to spin the idler
    ''wheel if the S2 has trouble detecting a particular line. The default
    ''setting should work in most cases.
  • WhitWhit Posts: 4,191
    edited 2011-02-04 11:14
    Thanks for the detailed reply Ben.
Sign In or Register to comment.