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.0b1.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for ws_sim868-1.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065ce635fe2c08258179ba7d4b4e83defda282e4027f8ba91939e719dbcd79ef |
|
MD5 | 380922f236935c7439c64df43f34debd |
|
BLAKE2b-256 | 3a9a3fd5dbbbb01dd59bae76d73a1854658658f618f31ff62c9ad6b55b44d653 |