You don't technically need to raise the Pi TX to 5V (for the Arduino) but I thought it better practice to do so, and it prevents damage through wiring to the wrong Arduino pin (i.e. if you wanted to use Software Serial, but accidentally set pin high).
Remember to do the following...
Hash out the following line in /etc/inittab:
#TO:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Edit out the following entries in the line in /boot/cmdline.txt:
And tie the ground of the Arduino to the ground of the Pi, otherwise it won't work!
To test, I'd reccomend uploading a sketch (see below) to the Arduino which reads a byte and returns something to the Pi then using 'Minicom -b 9600 -o -D /dev/AMA0' any keypress will return something. You'll likely have to install minicom (sudo apt-get minicom).
- Code: Select all
byte num = 0;
void setup ()
void loop ()
if ( Serial.available () )
num = Serial.read ();
Serial.print ( "I recieved : " );
Serial.println ( num, DEC );
NOTE: There is always a chance of damaging the Raspberry Pi pins if something is mis-wired since they are not 5V tollerent. BE CAREFUL.