AIS SIM7020E API Library, used on arduino, have been developed for any platform. This library include API such as UDP, MQTT.
#include "AIS_SIM7020E_API.h"
AIS_SIM7020E_API nb;
for UDP
nb.begin(serverIP,serverPort);
for MQTT
nb.begin();
nb.connectMQTT(serverIP,serverPort,clientID)
nb.RegisMQCallback(callback);
for UDP
nb.sendMsgSTR(serverIP,serverPort,payload); // Send data in String
// or
nb.sendMsgHEX(serverIP,serverPort,payload); // Send data in HexString
for MQTT
nb.publish(topic,payload)
Note please see more in the example code
AIS Magellan Library, a software development kit used on arduino platform, have been developed for Magellan IoT Platform.
#include "Magellan_SIM7020E.h"
Magellan_SIM7020E magel;
magel.begin(); //init Magellan LIB
Please use the payload in JSON format
Example
{"Temperature":25,"Humidity":90}
payload="{\"Temperature\":"+Temperature+",\"Humidity\":"+Humidity+"}";
The example code report payload data to Magellan IoT Platform.
magel.report(payload);
Please the location payload data as below format.
Example
payload="{\"Location\":"Latitude,Longitude"}";
Show battery on dashboard
Battery is range in 0-100 %.
Example
payload="{\"Battery\":100}";
Show Lamp status on dashbord
please use 0 or 1 to send status
Example
payload="{\"Lamp\":0}";
payload="{\"Lamp\":1}";
Note please see more in the example code
- Connect
DEVIO NB-DEVKIT I
to your computer. - Open the Magellan IoT platform and see the data on your account.
Note In this case, the device has already preload code then you just plug and play the development kit. If you have any questions, please see more details at https://www.facebook.com/AISDEVIO