mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Add rudimentary support for DS18B120 Thermometers, MH-Z19B CO2 Sensors, and ZWave.me controllers.
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
package com.lanternsoftware.thermometer;
|
||||
|
||||
import com.lanternsoftware.thermometer.context.ThermometerApp;
|
||||
import com.lanternsoftware.util.concurrency.ConcurrencyUtils;
|
||||
|
||||
public class TestStartup {
|
||||
public static void main(String[] args) {
|
||||
ThermometerApp app = new ThermometerApp();
|
||||
app.start();
|
||||
try {
|
||||
Thread.sleep(20000);
|
||||
} catch (InterruptedException _e) {
|
||||
_e.printStackTrace();
|
||||
IThermometer thermometer = new DS18B20Thermometer();
|
||||
for (int i=0; i<200; i++) {
|
||||
System.out.println(String.format("%.2f", thermometer.getTemperatureCelsius()));
|
||||
ConcurrencyUtils.sleep(1000);
|
||||
}
|
||||
app.stop();
|
||||
thermometer.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user