Ignore 'Python' for now.
In raspi-config you set
"Would you like a login shell to be accessible over serial?" to "No
Which is correct.
There will also have been another question after that to enable the Serial Port, you should answer yes to this.
the text in
will show if the settings are correct, post them up if you want a double check.
At this point at a terminal window.
as I mentioned should be giving you a stream of NMEA lines.
That is your basic test, only if that is working will python work.
I don't know CircuitPython and I'm not going to install it, other than on the Adafruit CPX.
the best people to ask are Adafruit!, they created it, they know the ins and out of it, it's their own work and you are using it with their own hardware. They know what they are talking about. It's a win, win to ask them.
I think you should be using
Code: Select all
# for a computer, use the pyserial library for uart access
uart = serial.Serial("/dev/ttyserial0", baudrate=9600, timeout=3000)
note the change to the tty part.
If you plug in a USB device, it should just work, no matter what the Serial Port is set to, since you are now using a USB port and not the 2 GPIO pins Serial Port. The are completely different in this respect. Which is nice
you'll find the USB on ttyUSB0 or ttyACM0
(my ublox 8 (M8030) is on ttyACM0)
Check with lsub
[ that is LUSB in lower case] that the USB is seen.
then as before, but now use
to see which gives the NMEA data stream.