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
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.
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.