7 public static void main(String[] args) throws Exception {
10 Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 361, -1);
14 } catch (Exception e) {
18 long start = System.currentTimeMillis();
21 long stop1 = System.currentTimeMillis();
24 long stop2 = System.currentTimeMillis();
26 System.out.println("Done......");
27 System.out.println(stop1 - start);
28 System.out.println(stop2 - stop1);
30 // t1.startTransaction();
31 // t1.addKV(ipingTimerKey, ipingTimer);
32 // t1.addKV(ia1, senDat);
33 // t1.commitTransaction();
39 // String pingTimerKey = "sensorController";
40 // IoTString ipingTimerKey = new IoTString(pingTimerKey);
42 // String a1 = "sensor";
43 // IoTString ia1 = new IoTString(a1);
46 // System.out.println("Starting System");
56 // // Runtime runTime = Runtime.getRuntime();
57 // // // Process proc = runTime.exec("/opt/vc/bin/vcgencmd measure_temp | tr -d 'temp=' | tr -d \"'C\"");
58 // // Process proc = runTime.exec("/opt/vc/bin/vcgencmd measure_temp");
59 // // BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
60 // // String line = null;
61 // // String dat = "";
62 // // while ((line = reader.readLine()) != null) {
63 // // System.out.println(line);
70 // // String pingTimer = Long.toString(System.currentTimeMillis());
71 // // IoTString ipingTimer = new IoTString(pingTimer);
74 // IoTString senDat = new IoTString(dat);
77 // t1.startTransaction();
78 // t1.addKV(ipingTimerKey, ipingTimer);
79 // t1.addKV(ia1, senDat);
80 // t1.commitTransaction();
88 // Thread.sleep(5000);
90 // } catch (Error e) {
91 // e.printStackTrace();
93 // Runtime runTime = Runtime.getRuntime();
94 // runTime.exec("gpio mode 4 out");
98 // runTime.exec("gpio write 4 1");
100 // runTime.exec("gpio write 4 0");
101 // Thread.sleep(500);