fulvio
Posts: 17
Joined: Tue Sep 25, 2012 5:29 am

Slice of Pi and Xbee

Wed Oct 17, 2012 11:22 pm

I have purchased a "Slice of Pi" from ModMyPi:

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

I have an Xbee module that I'm placing on this breakout.

I have been using a USB breakout board to send serial packets from the Xbee to an Arduino. This was always working just fine by sending a packet to '/dev/ttyUSB0'.

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)
I wasn't sure what device to set while using the Slice of Pi breakout instead.

Is it /dev/ttyAMA0?

According to this tutorial that's what they were using:

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

I tried that and it doesn't send any packets to the Arduino.

Any help would be greatly appreciated.


rudydevolder
Posts: 2
Joined: Sun Oct 21, 2012 1:00 pm
Location: Belgium
Contact: Website

Re: Slice of Pi and Xbee

Thu Nov 29, 2012 8:28 pm

Don't forget to free up the Com-port !!! ;) because it's default used/occupied for Console input/output
see:
http://www.hobbytronics.co.uk/raspberry-pi-serial-port

Return to “General programming discussion”