Pololu m3pi with an arm that sweeps obstacles

Hi all:

I’m new to this, but I need to work on a project that makes a line follower robot with an extra sensor to detect an obstacle, stop, remove it and keep going. If I use the m3pi, obviously, it won’t take apart huge obstacles, but as long as it takes away, say an eraser, from its way, that will be fine.

The “arm” will be just a fixed piece of metal attached to a servo, on the right side of the 3mpi, that under the appropriate command, will make a sweep of 90 degrees sweeping the obstacle from its way.

I did my research and I found out that I can add a sensor and a servo motor tho the 3mpi. I also figured out that I’ll have to build an extension to the 3mpi where I’ll put my new sensor, servo and “arm”.

So, I wonder what kind of sensor, and servo for the arm should I get?
Where can I get sample code for my 3mpi?
Also, do I have to buy any additional device to handle the with mi 3mpi (usb on my computer to the 3mpi) ?
Any advice is really appreciated.




I recommend an optical range finder as a sensor to detect objects.

You might consider using one of our micro servos. You can find all our servos on our website.

If you are using the m3pi by itself, there is some sample code on the 3pi product page under the Resources tab. You will also need an AVR programmer, like our USB AVR programmer, to program the 3pi.

If you are using an mbed as the main controller, you might find the cookbook link under the Resources tab of the m3pi product page useful. You could then use the USB cable included with the mbed to connect it to your computer (no additional hardware is required to program the mbed).

I suggest you read through the m3pi user’s guide and make sure you are at an appropriate skill level to use it before you order one.

  • Grant

I really appreciate your help.

I’ll read the documentation you mentioned.

Thank you.