Demo using a Nimbelink Skywire cellular modem paired with ST Nucleo. This demo reads several sensors and reports them to a Freeboard dashboard using dweet.io from Buglabs

Dependencies:   LIS3DH LM75B LPS331 hts221 mbed

Fork of Skywire_Demo by NimbeLink

Getting Started Guide

  • Set the JP5 jumper to E5V on the Nucleo
  • Place the Skywire Shield onto the Nucleo as pictured
  • Place the Skywire modem onto the Shield as picture and attach the antenna U.FL coax cable as pictured
  • Plug the 12V wall supply into the Skywire Shield /media/uploads/kholland/st00000002-sm.jpg
  • The new dashboard will show up on you account list under My Freeboards, you can then edit the name to whatever you like /media/uploads/kholland/default_skywire2.jpg
  • Under the Datasources tab on the dashboard, click the skywire link /media/uploads/kholland/default_skywire5.jpg
  • Change the THING NAME field to a unique string, we recommended using the MEID or IMEI on the Skywire Modem, but it could be anything you want. /media/uploads/kholland/default_skywire4.jpg
  • Next, Import the Skywire_Demo program into the online compiler
  • Open main.cpp. Starting at Line 58, there is a list of Skywire Modems. Uncomment the Skywire Modem that you are using. Make sure only one Skywire Modem is uncommented:

main.cpp

/*
 * DEFINE THE SKYWIRE MODEM
 * Uncomment only the modem that you are using.
 * Make sure only one modem is uncommented!
 */
//#define NL_SW_1xRTT_V         // Verizon 2G Modem - CE910-DUAL
//#define NL_SW_1xRTT_S         // Sprint 2G Modem - CE910-DUAL
//#define NL_SW_1xRTT_A         // Aeris 2G Modem - CE910-DUAL
//#define NL_SW_GPRS            // AT&T/T-Mobile 2G Modem
//#define NL_SW_EVDO_V          // Verizon 3G Modem
//#define NL_SW_EVDO_A          // Aeris 3G Modem
//#define NL_SW_HSPAP           // AT&T/T-Mobile 3G Modem
//#define NL_SW_HSPAPG          // AT&T/T-Mobile 3G Modem w/ GPS
//#define NL_SW_HSPAPE          // GSM 3G Modem, EU
//#define NL_SW_LTE_TSVG        // Verizon 4G LTE Modem
//#define NL_SW_LTE_TNAG        // AT&T/T-Mobile 4G LTE Modem
//#define NL_SW_LTE_TEUG        // GSM 4G LTE Modem, EU
//#define NL_SW_LTE_GELS3       // VZW LTE Cat 1 Modem
  • Next, to Line 73 in main.cpp, and change the DeviceID to the THING NAME you entered into your Freeboard:

main.cpp

/* --CHANGE THIS FOR YOUR SETUP" -- */
#define DeviceID "DweetIODeviceName"  //Freeboard DweetIO unique ID
  • If applicable, go to Line 77 in main.cpp and change the APN to your specific APN:

main.cpp

/* --CHANGE THIS FOR YORU SETUP (IF APPLICABLE)-- */
#if defined NL_SW_HSPAP || defined NL_SW_HSPAPG || defined NL_SW_HSPAPE || defined NL_SW_LTE_TSVG || defined NL_SW_LTE_TNAG || defined NL_SW_LTE_TEUG || defined NL_SW_LTE_GELS3
    std::string APN = "yourAPNhere";
#endif
  • Compile and upload to the Nucleo, cycle power to the shield and the sensor data should start to upload to your new Freeboard.
Revision:
4:e7a79d3542e1
Parent:
3:4b2176f6474c
Child:
5:977fa2ac1589
--- a/main.cpp	Mon Jan 12 23:27:12 2015 +0000
+++ b/main.cpp	Tue Jan 20 19:47:03 2015 +0000
@@ -1,4 +1,21 @@
-
+/* main.cpp */
+/* Copyright (C) 2015 nimbelink.com, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
 
 #include "mbed.h"
 #include "LPS331.h"
@@ -6,7 +23,7 @@
 #include "LM75B.h"
 
 /* --CHANGE THIS FOR YOUR SETUP" -- */
-#define DeviceID "mbedskywire"  //Freeboard DweetIO unique ID
+#define DeviceID "DweetIODeviceName"  //Freeboard DweetIO unique ID
 
 DigitalOut myled(LED1);
 DigitalOut skywire_en(PA_6);