Display on Serial monitor of Arduino IDE the position value

Hi All

I am using Pololu USB AVR Programmer v2 with Arduino IDE to program Simple3piLineFollower to our robot and we are using QTR-8RC Reflectance Sensor Array. So we need to display on Serial monitor of Arduino IDE the position value which read from following code. So please advice do so

unsigned int position = robot.readLine(sensors, IR_EMITTERS_ON);

Your prompt reply in this regard is highly appreciated

Thanks in advance

Hello.

The functions you are looking for are Serial.print() and Serial.println(). You can find more details and some code examples on their documentation pages, which are linked on the “Language Reference” page of the Arduino website.

- Amanda

1 Like

By the way, if you do not already know, you need to make three extra connections between the Pololu USB AVR Programmer v2’s GND, TX, and RX pins and the 3pi’s GND, PD0/RXD, and PD1/TXD. Also, you need to set the baud rate for the Arduino IDE’s Serial Monitor and in the Simple3piLineFollower sketch so that they are matching.

Since there are extra connections required between the 3pi and the AVR Programmer v2, and it sounds like you are not familiar with the Arduino syntax, it might be easier for you to just use the 3pi’s LCD to monitor the line’s position value.

- Amanda

Dear Amanda Thanks for the reply

I have enough knowledge about Arduino programming. So I thought that Serial.biging(9600) function wont work with 3pi library So I will try and update

Thanks once again
Dayan