Any output and debug purpose for line tracker program ?

pkf

Member
Hi, I read the bot120 manual and on page 28, a line tracker program was introduced (reading reflected light). Given that we are not trying to have the line tracker roam around at this stage, am I supposed to see some visible output once the program is downloaded ? e.g. navigating from picaxe editor 6 to read off a certain value ? Why was the debug statement included and what if it is omitted ?
 

hippy

Technical Support
Staff member
After that program is downloaded the Code Explorer Window should then be updated by the debug data sent back by the program.

The DEBUG command is included to send debug data from the PICAXE. If the DEBUG command is omitted then no data will be sent from the program.
 

pkf

Member
For a dark surface, I see that under the same row for variable b0, a decimal value of 97 and an ASCII value of 'a' (sometimes it's 'b' and 'c') was obtained.
For a light surface, the decimal value of 11 and no ASCII value was obtained.
Are these values that I can make use of in my program ? Why is it that I get an ASCII value for a dark surface but not for a light one ?
On page 29, the mid level value was set at 180. How would I know what mid level value to set, or do I assume 180 by default ?
 

hippy

Technical Support
Staff member
Are these values that I can make use of in my program ?
Yes. The values are how you determine if the sensor is over a light or dark area.

Why is it that I get an ASCII value for a dark surface but not for a light one ?
The ASCII field shows the printable ASCII character represented by the value. There is no printable ASCII character represented by the value 11 so none is shown, but there is by value 97.

On page 29, the mid level value was set at 180. How would I know what mid level value to set, or do I assume 180 by default ?
The mid level value should be whatever is midway between the light and dark values you are reading. For your light value of 11 and a dark value of 97 the mid level value would be 54.
 
Top