Skip to content

Arduino Library for AIS Magellan; It is fully compatible with DEVIO NB-DEVKIT I.

License

Notifications You must be signed in to change notification settings

FRDavid/Magellan_SIM7020E

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Version

AIS Library

AIS SIM7020E API

AIS SIM7020E API Library, used on arduino, have been developed for any platform. This library include API such as UDP, MQTT.

Example for use the AIS SIM7020E API

Call the AIS SIM7020E API library:

#include "AIS_SIM7020E_API.h"
AIS_SIM7020E_API nb;

Initial AIS SIM7020E API Library:

for UDP

nb.begin(serverIP,serverPort);    

for MQTT

nb.begin();    
nb.connectMQTT(serverIP,serverPort,clientID)
nb.RegisMQCallback(callback);     

Send Data:

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

AIS Magellan Library, a software development kit used on arduino platform, have been developed for Magellan IoT Platform.

Example for use the Magellan SDK

Call the Magellan library:

#include "Magellan_SIM7020E.h"
Magellan_SIM7020E magel;

Initial Magellan Library:

magel.begin();           //init Magellan LIB

Payload Data:

Please use the payload in JSON format

Example
{"Temperature":25,"Humidity":90}

payload="{\"Temperature\":"+Temperature+",\"Humidity\":"+Humidity+"}";

Report Data:

The example code report payload data to Magellan IoT Platform.

magel.report(payload);

Example Magellan payload format

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

Quick Started

  1. Connect DEVIO NB-DEVKIT I to your computer.
  2. 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

About

Arduino Library for AIS Magellan; It is fully compatible with DEVIO NB-DEVKIT I.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 95.7%
  • C 4.3%