Advertisement
SoapSuds

BeagleBone Tutorial--print GPS coords with python & EM-406A

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