Geolocation on WiPy 2.0 (MicroPython) without GPS Module, only WiFi
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LICENSE Initial commit Oct 29, 2017


Geolocation on WiPy 2.0 (MicroPython) without GPS Module, only WiFi

About this Repository

This code uses a WiPy2.0 and the Google Geolocation API as a Geo-Datalogger without GPS.


from geoposition import geolocate

ssid_ = <your ssid>  							#usually defined in your file
google_api_key = <API_KEY> 					  	#get from google
geo_locate = geolocate(google_api_key, ssid_)	#geo_locate object

valid, location = geo_locate.get_location()
	print("The geo position results: " + geo_locate.get_location_string())

The class initializer receives the following arguments

  • google_api_key: Google API key that you get clicking on the link available here;
  • wlan_check_interval: It defines the wait time between checking for new WiFi signals (in seconds (default = 1));
  • mcc: Mobile Country Codes (MCC) (default=262 -o2 Germany), you can find some values here;
  • mnc: Mobile Network Codes (MNC) (default=11 -o2 Germany), same as mcc.


Revision 0.1 (initial commit)

More Info