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.0b0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for ws_sim868-1.0.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f446e7515780ba647badc45c54e6496b2a94af1e27068a2a62b06571cb1ec625 |
|
MD5 | 064f3a1bf25ef61bf0fa0bde3749dbfa |
|
BLAKE2b-256 | 399c1bd13c5bc0269643867cd16f436d82d129ebc9bc8d3f0a6522edb9fc3fb6 |