<< return to Pixycam.com

Arduino Line Following API

Hi,
I have my class is starting on line following, and they were first stumped that in the API it says:
"int8_t setMode(uint8_t mode)

This function sets various modes in the line tracking algorithm. The mode argument consists of a bitwise-ORing of the following bits: "

But fails to mention which bit is which.

So I took a look in the library, which yields:

LINE_MODE_TURN_DELAYED 0x01
LINE_MODE_MANUAL_SELECT_VECTOR 0x02
LINE_MODE_WHITE_LINE 0x80

Hope this can help someone else.
best,
Michael

Hi Michael,
Sorry for the confusion. We thought people would just use the constants themselves instead of the bit values.

setMode(LINE_MODE_TURN_DELAYED | LINE_MODE_MANUAL_SELECT_VECTOR)

instead of

setMode(0x01 | 0x02 )

Edward