Skip to content

Connect a Ublox NEO-6M/NE0-M8N gps module to a WiPy2.0/3.0

Notifications You must be signed in to change notification settings

lemariva/wipy2.0-GPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Driver for GPS module using WiPy 2.0/3.0

This library allows to connect a Ublox NEO-6M/NEO-M8N GPS module to a WiPy 2.0/3.0

Wiring

Wipy 2.0 NEO-6M/NEO-M8N
3.3v VCC
GND GND
P3(G12) RX
P4(G11) TX

Use:

from ublox_gps import MicropyGPS
import time, utime

# GPS initialization
UPDATE_GPS = const(10000)					  # GPS update rate (in ms)

uart = UART(1, 9600)                          # init with given baudrate
uart.init(9600, bits=8, parity=None, stop=1)  # init with given parameters

my_gps = MicropyGPS()
stat = None
updateGPS = utime.ticks_ms()

while True:        
    try:
		# Updating GPS position
        if(utime.ticks_ms() - updateGPS >= UPDATE_GPS):
            updateGPS = utime.ticks_ms()
            stat = my_gps.updateall(uart.readall())   
		        
        if(stat != None):
			# do something with the data		
		
	except:     # gps problems
        my_gps.stringclean()  # cleaning string and starting again
		
	time.sleep_ms(1000)   # sleeping 1 second

More Info:

Credits:

License:

  • Check files

About

Connect a Ublox NEO-6M/NE0-M8N gps module to a WiPy2.0/3.0

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages