A micropython package for IoT
Project description
micropython-consentiumthings
Passing tests on ESP 8266 and ESP 32
Developed by Debjyoti Chowdhury from ConsentiumInc
Installing dependencies and main library
First connect to WiFi with SSID and Psk
import network
ssid = ""
psk = ""
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect(ssid,psk)
station.isconnected()
print(station.ifconfig())
Then install dependencies and main module using upip
>>> import upip
>>> upip.install('micropython-urequests')
>>> upip.install('micropython-consentiumthings', '/lib/')
Examples of How To Use
Making requests to Consentium IoT server
from ConsentiumThings import ThingsUpdate
import utime
api_key = ""
ssid = ""
psk = ""
board = ThingsUpdate(key=api_key)
board.initWiFi(ssid,psk)
while True:
sensor_val = [1, 2, 3, 4, 5, 6, 7]
info_buff = ["a", "b", "c", "d", "e", "f", "g"]
r = board.sendREST(sensor_val=sensor_val, info_buff=info_buff)
print(r.text)
utime.sleep(5)
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
Built Distribution
File details
Details for the file micropython-consentiumthings-0.1.6.tar.gz
.
File metadata
- Download URL: micropython-consentiumthings-0.1.6.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ccee8413bb498c2c5a0eaadedca7722b1f7e5109b0bfd1d10845ffd454634df |
|
MD5 | 8bc1f0982990d798e1e084099ee219c2 |
|
BLAKE2b-256 | 2da7665d20ebbb2a2969780229b41861963362ced2a02649edbc034bed5f2c36 |
File details
Details for the file micropython_consentiumthings-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: micropython_consentiumthings-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abaf141a636649ca1da8e610a97d19ed669a5a4e9e3436f5ee3dd489c0d9ebe |
|
MD5 | 239062ca607b4608078139a716fd20fb |
|
BLAKE2b-256 | 9643f94cff997bdd9762ab79b956b9064e4f59db763519ea703de40e91fd391e |