https://www.modmypi.com/shop/slice-of-p ... akout-boad
I can't seem to be able to send serial packets to an Arduino using /dev/ttyAMA0 on this breakout (if that's even correct since there's no real documentation on how to actually send the packets. Prior I have used an Xbee module on /dev/ttyUSB0 and am able to send packets to an Arduino with an Xbee shield just fine from my Raspberry Pi) so I thought I'd use the following tutorial to free UART:
I just followed this tutorial to free UART on my Raspberry Pi:
http://learn.adafruit.com/adafruit-nfc- ... -on-the-pi
I made all these changes and after the reboot I'm getting the following
errors:
Code: Select all
VFS: Unable to mount root fs via NFS, trying floppy
VFS: Cannot open root device "(null)" or unknown-block(2,0)
Please append a correct "root=" boot option: here are the available
partitions:
Kernel panic - not syncinc: VFS: Unable to mount root fs on
unknown-block(2,0)
...
These are the only changes I made to free UART:
From the command prompt enter the following command:
Code: Select all
$ sudo nano /boot/cmdline.txtCode: Select all
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
console=tty1 $
Code: Select all
dwc_otg.lpm_enable=0 console=tty1 $From the command prompt enter the following command:
Code: Select all
$ sudo nano /etc/inittabCode: Select all
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Code: Select all
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
The problem is that now that I have this slice of pi breakout board and I'm not sure what TTY device to use.
This is the current python code I was using:
Code: Select all
import socket
import RPi.GPIO as GPIO
import wiringpi
device = "/dev/ttyUSB0"
message = "hello world"
serial = wiringpi.Serial(ttyDevice, 9600)
serial.puts(message)
Is it /dev/ttyAMA0?
According to this tutorial that's what they were using:
http://www.doctormonk.com/2012/06/raspb ... ensor.html