Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Author: Shane Betz
- #PIPBOY 3000 Project Test Codes
- #Follow this example for wiring: http://wiring.org.co/learning/libraries/basicpositioning.html
- # Where the arduino rx/tx is Beaglebones UART rx/tx | Pins 24 & 26
- #Project Website: http://pipboy3000.com/social
- #Please help contribute to the PIPBOY 3000 project!
- #PINMUXING -- Run these two terminal/shell commands sperately and before you start this script.
- #echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd
- #echo 0 > /sys/kernel/debug/omap_mux/uart1_txd
- import serial
- import time
- #Connect to GPS device at UART1 RX/TX
- ser = serial.Serial(
- port='/dev/ttyO1',
- baudrate=4800,
- timeout=1,
- parity=serial.PARITY_NONE,
- stopbits=serial.STOPBITS_ONE,
- bytesize=serial.EIGHTBITS
- )
- #Constantly print out every line returned from device
- while(True):
- print ser.read();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement