Sending serial packets from UART breakout board. - Raspberry Pi Forums


i purchased following breakout board modmypi:

https://www.modmypi.com/shop/slice-of-p ... akout-boad

can't seem able send serial packets arduino using /dev/ttyama0 on breakout (if that's correct since there's no real documentation on how send packets. prior have used xbee module on /dev/ttyusb0 , able send packets arduino xbee shield fine raspberry pi) thought i'd use following tutorial free uart:

followed tutorial free uart on raspberry pi:

http://learn.adafruit.com/adafruit-nfc- ... -on-the-pi

made these changes , after reboot i'm getting following
errors:

code: select all

vfs: unable mount root fs via nfs, trying floppy vfs: cannot open root device "(null)" or unknown-block(2,0) please append correct "root=" boot option: here available partitions: kernel panic - not syncinc: vfs: unable mount root fs on unknown-block(2,0) ... 
sits there these errors , doesn't display login prompt.

these changes made free uart:

command prompt enter following command:

code: select all

$ sudo nano /boot/cmdline.txt
, changed:

code: select all

dwc_otg.lpm_enable=0 console=ttyama0,115200 kgdboc=ttyama0,115200 console=tty1 $ 
to:

code: select all

dwc_otg.lpm_enable=0 console=tty1 $
step two: edit /etc/inittab

command prompt enter following command:

code: select all

$ sudo nano /etc/inittab
, changed:

code: select all

#spawn getty on raspberry pi serial line t0:23:respawn:/sbin/getty -l ttyama0 115200 vt100 
to:

code: select all

#spawn getty on raspberry pi serial line #t0:23:respawn:/sbin/getty -l ttyama0 115200 vt100 
step three: reboot pi.

problem have slice of pi breakout board , i'm not sure tty device use.

current python code using:

code: select all

import socket import rpi.gpio gpio import wiringpi  device = "/dev/ttyusb0" message = "hello world"  serial = wiringpi.serial(ttydevice, 9600) serial.puts(message) 
wasn't sure device set while using slice of pi breakout instead.

/dev/ttyama0?

according tutorial that's using:

http://www.doctormonk.com/2012/06/raspb ... ensor.html

what have done looks correct. if other end 5v must add level shifting drivers. think can add leds resistors uart lines though gpios. should able se them flicker. tx should work , can redirect stuff straight device on command line. "ls > /dev/tty....". oscilloscope lot better.

test come mind loopback connecting tx rx. not quite sure how test search it.


raspberrypi



Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums