GithubHelp home page GithubHelp logo

lemariva / upygeo Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 1.0 11 KB

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

Home Page: https://lemariva.com/blog/2017/11/micropython-wipy2-0-geolocalization-using-wlan

License: Apache License 2.0

Python 100.00%
geo-location wifi wipy esp32 micropython example-project

upygeo's Introduction

uPyGeo

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.

Example

from geoposition import geolocate

ssid_ = <your ssid>  							#usually defined in your boot.py 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()
if(valid):
	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.

Changelog

Revision 0.1 (initial commit)

More Info

upygeo's People

Contributors

lemariva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

binloan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.