Skip to main content

MicroPython IoT lib

Project description

ConsentiumThingsPy

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micropython-consentiumthings-0.1.1.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file micropython-consentiumthings-0.1.1.tar.gz.

File metadata

File hashes

Hashes for micropython-consentiumthings-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2baac445603f0672e7368b644a1d0da7e614357691d0d783ffe7eae1976f9de9
MD5 baf89458f975faa78da18017b7388591
BLAKE2b-256 b49c74e303529d99b60804a84a16ebd6ba0eadb13299dec29b17aa3b8c67f15e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page