Skip to main content

A MicroPython library for send sensor data to ConsentiumThings IoT server

Project description

ConsentiumThingsPy

Passing tests on ESP 8266 and ESP 32

Developed by Debjyoti Chowdhury from ConsentiumInc

Installing dependencies and main library

import upip
import network
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect("", "")
station.isconnected()
print(station.ifconfig())

upip.install('micropython-urequests')
upip.install('micropython-consentiumthings')

Examples of How To Use

Creating A Server

from ConsentiumThings import ThingsUpdate
import utime

api_key = ""

board = ThingsUpdate(key=api_key)

board.initWiFi("", "")

sensor_val = [1, 2, 3, 4, 5, 6, 7]
info_buff = ["a", "b", "c", "d", "e", "f", "g"]

while True:
    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.0.2.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micropython_consentiumthings-0.0.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for micropython-consentiumthings-0.0.2.tar.gz
Algorithm Hash digest
SHA256 63eb50759b356f0bb93b6c0afcea05a666c5e36db4acbaed8d5a6a2c97c5074c
MD5 f8d2ae8f48c72ecd5380aaf6cf550847
BLAKE2b-256 f739aa4efc67d8b97d1701e5c7b03682998838236a8517a42a4c9bb5e57c80cd

See more details on using hashes here.

File details

Details for the file micropython_consentiumthings-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for micropython_consentiumthings-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 99e6c9d0d8780fc9ce9e96dcea9dd6a2402793c6de963a8a461fac6f0fa7588e
MD5 05eeb1fd1c34a791a2a4f8eb9f4faa78
BLAKE2b-256 cdeb73b1432fb2a966e30796eeb72ffe5bab3c2af75f42beb8aef19ad4737471

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