Having got my I2C project working well I decided to make the Pi talk to an Arduino via serial. I have connected the UART pins on the Pi (14 & 15) via a level shifter to the Arduino and modified /etc/inittab to exclude /dev/ttyAMA0 and also /boot/cmdline.txt so the Pi is not writing boot up info out to /dev/ttyAMA0. And then rebooted.
This all worked fine. I have written a simple Arduino sketch to listen for incoming serial data and print it out. The problem I am getting is when I runthe following Python code:
Code: Select all
#! /usr/bin/python import serial serialport = serial.Serial("/dev/ttyAMA0", 9600, timeout=0.5); serialport.write("LED\n\n");