Python package to control the Waveshare GSM/GPRS/GNSS Pi HAT
Project description
ws_sim868
Interface module for the Waveshare GSM/GPRS/GNSS Pi Hat
Features
- HTTP GET and POST requests
- Automatically start Modem if turned off
- Receive GNSS Location
Instalation
pip install ws-sim868
Overview
Examples:
HTTP Get Request
from ws_sim868.modemUnit import ModemUnit
import time
if __name__ == "__main__":
m = ModemUnit()
m.apn_config('super', '', '')
m.network_start()
res = m.http_get("http://example.com")
print(res)
while True:
time.sleep(0.5)
Get Location
from ws_sim868.modemUnit import ModemUnit
import time
if __name__ == "__main__":
m = ModemUnit()
m.gnss_start()
while True:
time.sleep(3)
print(m.get_gnss_loc())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ws_sim868-1.0.0b3.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for ws_sim868-1.0.0b3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c77f8978efacc259eacceef5a363d86e8d29bb9d2708116731d09ea0d7f98488 |
|
MD5 | c658d774f468465368dc209a8a7e10c6 |
|
BLAKE2b-256 | c3f54f3713fad38e7b1efa3ab03cb1809579608e0d51f741fb8785d96dcd9a0a |