Hello,i bought 3pi(Atmmega328) few weeks ago. i need to use arduino to control the 3pi, so the PD0(TxD) and PD1(RxD) would be used to connect to arduino. Now, i wish i can set up camera, mic and speaker on the 3pi, but i don’t know which pins can i use. I only found a camera which connect to 3pi by TxD,RxD(CMUcam is too expensive!)
I saw the user’s guide and founded that the LCD pins(PB0,PD2,PD4) can become completely free digital I/Os when i removed the LCD. But i’m not sure that these free digital I/Os can use the same way as TxD and RxD!
Did anyone face the same problem ? Or someone have a better ideas for the camera problems?
The AVR on the 3pi only has one hardware UART, so if you want to connect those pins to an Arduino, you will not have serial pins available for your camera. You could consider freeing up 3pi pins by removing the LCD and using software serial to communicate with your camera via those pins (note: the Pololu AVR library does not support software serial, but there are many software serial libraries out there for the ATmega328).
However, I think offloading more tasks to the 3pi, such as camera processing, is not going to be the ideal approach. If you are using your Arduino as the 3pi’s high-level controller, why not have the Arduino interface with the camera directly using the Arduino NewSoftSerial library? In general, you will have an easier time if you wire your extra devices and sensors directly to your high-level controller. Otherwise, you will need to program your 3pi to interface with these extra devices (and the 3pi has very few free I/O pins) and then serially transmit the data to your Arduino.
By the way, have you considered using a more capable microcontroller board as your 3pi’s high-level controller? We just released the m3pi robot, which lets you use an mbed development board as your robot’s high-level controller. The mbed is much, much more capable than the Arduino (32-bit vs 8-bit, 96 MHz vs 16 MHz, more hardware peripherals, including multiple UARTs, etc) and it is quite easy to use. An m3pi expansion kit is available for upgrading your 3pi to an m3pi robot.