initial version / sends time + 012345689

Dependencies:   libmDot mbed-rtos mbed

Fork of wotiolora by Scott Tudd

Revision:
2:8cf7270307e5
Parent:
1:6b84fe382e27
Child:
3:689fbc447181
--- a/main.cpp	Fri Oct 30 13:35:16 2015 +0000
+++ b/main.cpp	Mon Nov 09 23:30:49 2015 +0000
@@ -8,7 +8,7 @@
 // these options must match the settings on your Conduit
 // uncomment the following lines and edit their values to match your configuration
 static std::string config_network_name = "wotioloranetwork";
-static std::string config_network_pass = "<INSERT PASSPHRASE>";
+static std::string config_network_pass = "iotandbigdata";
 static uint8_t config_frequency_sub_band = 7;
 
 
@@ -32,18 +32,9 @@
     int32_t ret;
     mDot* dot;
     std::vector<uint8_t> data;
-    std::string data_str = "hello!";
+    std::string data_str = "LoRa->wotio";
 
    
-    // configure the Ticker to blink the LED on 500ms interval
-    tick.attach(&blink, 1.0);
-    
-    // print the message on 2s interval
-    while (true) {
-        printf("hello world");
-        wait(2);
-    }
-    
     // get a mDot handle
     dot = mDot::getInstance();
     
@@ -119,6 +110,8 @@
         if ((ret = dot->send(data)) != mDot::MDOT_OK) {
             logError("failed to send", ret, mDot::getReturnCodeString(ret).c_str());
         } else {
+            // configure the Ticker to blink the LED on 1sec interval
+            tick.attach(&blink, 1.0);
             logInfo("successfully sent data to gateway");
         }