3pi pid linefollow demo program - use LCD to set white line?

Hai,

I just got my 3pi today, and I cannot for the life of me work out how to do this.

I want my 3pi to start up and first think ask me if i want white-on-black or black-on-white - i know the 2 commands i use are read_line and read_line_white, but i can’t even get a simple if() statement with a fixed variable to pick between them.

Help? I suck at C >.<

–neg

Hello,

Could you post your best attempt so that I can help you fix it? Anyway, I would do something like:

unsigned char use_white_line;
// ... code to set use_white_line true or false ...

while(1)
{
    // main loop
    if(use_white_line)
        read_line_white(...);
    else
        read_line(...);
}