Arduino Serial communication with 3pi

Hello,
I was wondering if I could use all of the arduino serial communcation functions?

If not, I was wondering if you could tell me about functions of the 3pi library that can take in analog signals from two probes and record the signals, such that they can later be uploaded to my computer when the 3pi is once again connected to my computer. I know that there exist functions in the Arduino libraries that can do this. I also know that the arduino and the 3pi, according to Pololu’s specs, both have ATmega328 microcontrollers.

Thank you for all your help.

Hi

I had asked a similar question a while back. I am pasting the reply below…

Hope this helps!


Re: 3Pi Example Serial1 - where is the serial monitor?
by DavidEGrayson on Sat Jul 16, 2011 4:43 pm

Hello, navillus55.

You can use the Pololu USB AVR Programmer’s TTL Serial Port to send and receive serial bytes from the ATmega168/328p on your 3pi, much like the Arduino’s serial monitor, but you will need to make three extra connections:

The GND on the programmer needs to connect to GND on the 3pi.
The TX line on the programmer needs to connect to PD0/RXD on the 3pi.
The RX line on the programmer needs to connect to PD1/TXD on the 3pi.

You will also need to run a terminal program on your PC. For more information, see the “Communicating via the USB-to-TTL-Serial Adapter” section of the Pololu USB AVR Programmer User’s Guide and the “Orangutan Serial Port Communication Functions” section of the Pololu AVR C/C++ Library User’s Guide.

Because of the extra connections required, you may find it easier to just use the 3pi’s LCD to monitor and debug your program, as demonstrated in many of our example programs.

–David
DavidEGrayson
Site Admin

I suppose another question I have that I mentioned in my first post was about storing signals on the 3pi microprocessor.
How much can I store on it and how? Can I just use the Arduino functions that do this?

Hello.

The 3pi uses the same microcontroller as the Arduino Uno, so I expect the Arduino functions you are talking about will work the same way on the 3pi. Do you have links to the documentation for the functions you are talking about?

The ATmega328 on the 3pi has 2KB of RAM that you can use to temporarily store data (it is lost when the 3pi is reset) and 1 KB of EEPROM that can be used to store data that persists through resets and power cycles (though writing to EEPROM is relatively slow, taking around 4 ms per byte). Arduino functions that write to EEPROM should work on the 3pi. Unfortunately, I don’t recall off-hand what restrictions there are on writing to flash on the ATmega328 while your program is running. You can check the ATmega328 datasheet for more information, but I think using flash for data storage is not going to be practical.

- Ben