background image

mangOH™ Green

Tutorial—Arduino-compatible 
Shield  to AirVantage

4119370

Rev 1

Contents subject to change

Summary of Contents for mangOH Green

Page 1: ...mangOH Green Tutorial Arduino compatible Shield to AirVantage 4119370 Rev 1 Contents subject to change...

Page 2: ...NERAL INCIDENTAL CONSEQUENTIAL PUNITIVE OR EXEMPLARY DAMAGES INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR REVENUE OR ANTICIPATED PROFITS OR REVENUE ARISING OUT OF THE USE OR INABILITY TO USE ANY SI...

Page 3: ...Preface Rev 1 6 18 16 3 4119370 Revision History Revision number Release date Changes 1 June 2016 Document created...

Page 4: ...angOH Green for Arduino development 10 Install mangOH Green Platform Applications 10 Prepare for Arduino development 12 Download Sample Project 12 Prepare the Sketch 13 Add Required Libraries to Ardui...

Page 5: ...development This is not a coding tutorial When you finish this tutorial you will have git cloned the mangOH platform used the Arduino IDE to build and install a sketch on the mangOH Green and configur...

Page 6: ...OH Green with at least main antenna connected activated SIM inserted power supplied via USB or the DC jack AirVantage account with your mangOH Green registered on it Note The mangOH Green Fundamentals...

Page 7: ...H Green is set up with at least an activated SIM the main antenna and USB or DC power selected but not connected In this example DC power is selected 2 Hold the Grove shield by its edges position it a...

Page 8: ...Green 3 Attach the DHT sensor s to the Grove shield connector pins as follows Temperature and Humidity sensor Pin A0 Dust sensor Pin D8 Oxygen sensor Pin A3 Light sensor Pin A1 Sound sensor Pin A2 Wa...

Page 9: ...evelopment Prepare for Arduino development Connect to the IoT Cloud 5 Connect the mini USB cable between your computer and the mangOH Green use connector CN330 Figure 2 4 mangOH Green connected via mi...

Page 10: ...ject page but are shown here with extra details for clarity a In your Linux environment Linux system or Linux Virtual Machine open a terminal window b If you have not used git or git repo to clone a p...

Page 11: ...orm cd mangOH legato make wp85 Note This creates a build directory for the wp85 s platform installation file When the project finishes building the command prompt reappears 3 Go to the build directory...

Page 12: ...run with any combination of the sensors You can modify the sketch to ignore any sensors that are not used or leave the sketch as is and ignore the readings reported from missing sensors Note The tutor...

Page 13: ...d finishes extract the zip file ArduinoBridge master zip to a working folder referred to as WORK_DIR for the remainder of this tutorial 4 2 Prepare the Sketch Note These instruction describe steps for...

Page 14: ...rt only the sensors that you have installed on the shield When the sketch is run any sensors that are not installed will be reported as noise random values You can modify the sketch or just ignore the...

Page 15: ...fferent location use the appropriate path Note In this example the swibridge library folder is in WORK_DIR ArduinoBridge master arduino libraries and the Arduino libraries folder is in C Program Files...

Page 16: ...for Arduino development Connect to the IoT Cloud f Click Open and it installs to your contributed arduino libraries folder 3 Optional step Depending on the IDE you are using you might have to restart...

Page 17: ...there are no issues during the upload you can turn on verbose output which shows detailed status messages File Preferences 6 When the sketch has successfully compiled upload it to the ATmega32U4 chip...

Page 18: ...e IoT Cloud 7 Check that the sketch is running and whichever sensors you are using are working properly showing reasonable values Open a serial monitor in the IDE Tools Serial Monitor Note In the exam...

Page 19: ...1 Configure AirVantage To Receive Sensor Data Before AirVantage can receive the sensor data it needs to be configured to understand which messaging protocol is used for the data and what the data rep...

Page 20: ...e a zip file of the mqttapplicationmodel folder 7 Select the zip file and click Open 8 Select Advanced settings 9 Select I want to publish my application after releasing it Note If you do not want to...

Page 21: ...no development Connect to the IoT Cloud 10 Click Start to install the model The model installs When you return to the MyApps screen you will see the appli cation appear in the list of published applic...

Page 22: ...tions list 16 Click the Credentials button 17 Enter the MQTT password for the application the password SwiBridge is defined in the model file and click Continue 18 Click Save The Monitor Systems scree...

Page 23: ...ails of a communication click somewhere on the row In this example the communications for temperature and humidy are shown You have now set up your mangOH Green to support Arduino sketches built and i...

Reviews: