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);
15 String pingTimerKey = "sensorController";
16 IoTString ipingTimerKey = new IoTString(pingTimerKey);
19 IoTString ia1 = new IoTString(a1);
22 System.out.println("Starting System");
32 Runtime runTime = Runtime.getRuntime();
33 // Process proc = runTime.exec("/opt/vc/bin/vcgencmd measure_temp | tr -d 'temp=' | tr -d \"'C\"");
34 Process proc = runTime.exec("/opt/vc/bin/vcgencmd measure_temp");
35 BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
38 while ((line = reader.readLine()) != null) {
39 System.out.println(line);
46 String pingTimer = Long.toString(System.currentTimeMillis());
47 IoTString ipingTimer = new IoTString(pingTimer);
50 IoTString senDat = new IoTString(dat);
53 t1.startTransaction();
54 t1.addKV(ipingTimerKey, ipingTimer);
55 t1.addKV(ia1, senDat);
56 t1.commitTransaction();
74 Runtime runTime = Runtime.getRuntime();
75 runTime.exec("gpio mode 4 out");
79 runTime.exec("gpio write 4 1");
81 runTime.exec("gpio write 4 0");