Making variable names and types more precise, e.g. machineId instead of deviceKey.
authorrtrimana <rtrimana@uci.edu>
Sat, 14 Apr 2018 00:02:10 +0000 (17:02 -0700)
committerrtrimana <rtrimana@uci.edu>
Sat, 14 Apr 2018 00:02:10 +0000 (17:02 -0700)
version2/src/C/Sensor-Arduino.ino

index 99bacdc8a2304543b821fe49ab71ce84b48fbe67..48614b21c8ff16ce01220b21ddf6e3c6978463bf 100644 (file)
@@ -9,7 +9,7 @@
 #define DHTPIN                 2               // what pin we're connected to
 #define DHTTYPE                DHT22   // DHT 22  (AM2302)
 // IoTCloud
-#define SLEEP_TIME             30              // Sleep time in seconds
+#define SLEEP_TIME             1800    // Sleep time in seconds
 
 // Initialize DHT sensor for normal 16mhz Arduino
 DHT dht(DHTPIN, DHTTYPE);
@@ -44,14 +44,14 @@ void setup() {
        //}
        //Serial.println();
        
-       int deviceKey = (int) mac[4] + mac[5];
+       int64_t machineId = (int64_t) mac[4] + mac[5];
        // IoTCloud library
        timer = TimingSingleton_getInstance();
        foundError = false;
        transStatusList = new MyVector<TransactionStatus *>();
        IoTString *baseurl = new IoTString("http://dc-6.calit2.uci.edu/test.iotcloud/");
        IoTString *password = new IoTString("reallysecret");
-       t1 = new Table(baseurl, password, deviceKey, -1);
+       t1 = new Table(baseurl, password, machineId, -1);
        t1->rebuild();
 
        baseurl->releaseRef();