Scribbler S2 Line Following Question
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
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
Edit: I have it on good authority that S2's line sensors CAN be adjusted in software.
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.