Go to advanced search

by Pavo_46
Wed Jan 28, 2015 2:43 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

Re: NMEA MULTIPLEX

All right, here is a very basic framework to illustrate the idea. It doesn't use anything fancy, and assumes there are no errors. In fact, error checking is what makes your software great, so that it either does the Right Thing in case of an error, or at least doesn't crash. #!/usr/bin/env python i...
by Pavo_46
Mon Jan 26, 2015 4:13 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

Re: NMEA MULTIPLEX

I think your 'with' statement syntax is not correct, and the whole thing is too terse for you to understand. I don't think you should use gpsd yet, until you have something working. I also wouldn't worry about the order in which the serial ports are created until then (but it's worth knowing it's a...
by Pavo_46
Sun Jan 25, 2015 9:31 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

Re: NMEA MULTIPLEX

I have an Adafruit ultimate GPS connected to the serial UART. I use the gpsd package to collect the data, which allows multiple programs to share the data. I believe it suggests the GPS tools package, which allows you to check your GPS is working. Viewing the raw data will show you have the baud ra...
by Pavo_46
Sun Jan 25, 2015 6:47 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

Re: NMEA MULTIPLEX

this has improved the issue i used the following code [code]from __future__ import print_function import serial, io addr0 = '/dev/ttyUSB0' addr1 = '/dev/ttyUSB1' baud0 = 9600 baud1 = 115200 GPS = serial.Serial(addr0,baud0) ECHO = serial.Serial(addr1,baud1) fname = 'RaspSurvey-Output.txt' fmode = 'a'...
by Pavo_46
Sat Jan 24, 2015 4:42 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

Re: NMEA MULTIPLEX

hi there, latest attempt (code below) from __future__ import print_function import serial, io addr0 = '/dev/ttyUSB0' addr1 = '/dev/ttyUSB1' baud0 = 9600 baud1 = 115200 fname = 'RaspSurvey-Output.txt' fmode = 'a' with serial.Serial(addr0,baud0,addr1,baud1) as pt, open(fname,fmode) as outf: spb = io.T...
by Pavo_46
Fri Jan 23, 2015 5:19 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

Re: NMEA MULTIPLEX

thanks for the reply!!

the echo sounder and gps will be connected to the Pi at the same time using usb-RS232 adapters. echo sounder is running at 1 Hz and with a baud of 115200, where as the GPS has a baud of 9600
by Pavo_46
Fri Jan 23, 2015 4:29 pm
Forum: Python
Topic: NMEA MULTIPLEX
Replies: 15
Views: 3959

NMEA MULTIPLEX

Hi there!! This is my first time on a forum so bare with me. I am putting together a project using a raspberry pi and python to collect ASCII data from a GPS and echo sounder, to collect geolocated depths. Now i have hit a serious brick wall, i have managed to write the following script which (alter...

Go to advanced search