Hi there,
Im new to robotics and I thought the 3Pi would be a good development platform to start.
My current project is to try and make the 3Pi drive around on a table and not fall off. I thought that the in-built IR sensors would do this for me and I have the robot driving around and coming to a stop when it senses the edge.
Unfortunately the sensors aren’t far out enough by the wheels so if its going up to an edge at an angle it won’t see the edge and just fall off.
(after soldering the broken parts back on ) I decided I would need an extra set of sensors out by the wheels and decided to use PD0 & PD1 with the QTR-1RC’s.
I am now very stuck with what to do next?!
I think I am going to need to edit Pololu3pi.cpp’s “Pololu3pi::init” function as follows:
void Pololu3pi::init(unsigned int line_sensor_timeout_us)
{
// Set up the line sensor and turn off the emitters.
// The sensors are on PC0..4, and the emitter is on PC5.
unsigned char pins[5] = {14,15,16,17,18};
qtr3pi.init(pins,5,line_sensor_timeout_us,19);
etc...
To:
void Pololu3pi::init(unsigned int line_sensor_timeout_us)
{
// Set up the line sensor and turn off the emitters.
// The sensors are on PC0..4, and the emitter is on PC5.
unsigned char pins[7] = {0,1,14,15,16,17,18};
qtr3pi.init(pins,7,line_sensor_timeout_us,19);
etc...
But after compiling libpololu.a with those changes I get very strange errors from Make:
and then when I delete Main.elf and let Make build it again I get:
I am including #include “Pololu3pi.h” so i don’t know why its saying undefined reference to `readLineSensors’
If anyone has any experience with this kind of thing could you please point me in the right direction.
I have little understanding of C++. And I am currently compiling on a Mac if it makes any difference to anyone.
Thanks for your time and any help would be much appreciated.
Marcus