This library provides functions to access environmental data from the XinaBox CW01.
Read more about it or purchase one here
The CW01 uses ESP8266 core to transimit and receive data. This libray enables you connect to IoT clouds specifically with:
- AllThingsTalk
- Microsoft Azure
- Ubidots
There are functions to:
- Connect to Wi-Fi
- Connect to IoT platforms (ATT, Ubidots or Azure)
- Transmit data
- Receive data
A comprehensive set of How-to guides that show you how to use the blocks is available online:
// Connect to WiFi
cw01.connectToWifi("SSID", "PSK")
// Connect
cw01.connectToATT("TOKEN", "ID")
//Send string data
cw01.IoTSendStringToATT("string", "asset_name")
//Send numerical data
cw01P.IoTSendValueToATT(0, "asset_name")
//Send boolean data
cw01.IoTSendStateToATT(false, "asset_name")
//Get data
cw01.IoTgetATTAssetValue("asset_name")
// Connect
cw01.connectToAzure("access_endpoint")
//Send string data
cw01.IoTSendStringToAzure("variable_name", "string")
//Send numerical data
cw01.IoTSendValueToAzure("variable_name", 0)
//Send boolean data
cw01.IoTSendStateToAzure("variable_name", false)
//Get data
cw01.IoTGetValueFromAzure("variable_name")
// Connect to Industrial or Education account type
cw01.connectToUbidots(USER.INDUSTRIAL, "TOKEN")
//Send numerical data to variable in device. Select true to enter GPS location
cw01.IoTSendValueToUbidots(0, "device_api", "variable_api", false)
//Get data
cw01.IoTgetValuefromUbidots("device_api", "variable_api")
//Add GPS location, latitude and longitude
cw01.IoTaddLocation(0, 0)
MIT
Copyright (c) 2019, XinaBox Limited
- PXT/microbit