************************************************************
************************************************************
Iniciando OneWireViewer
************************************************************
************************************************************
------------------------------
| PRESS CTRL-C TO EXIT |
------------------------------
Apr 05, 2017 2:11:50 PM com.pi4j.io.w1.W1Master readDevices
INFO: no device type for [81] found - ignoring
Apr 05, 2017 2:11:50 PM com.pi4j.io.w1.W1Master readDevices
INFO: no device type for [01] found - ignoring
-------------- Wed Apr 05 14:11:50 CDT 2017
DeviceId:81-00000020cc90
DeviceId:01-0000098b285f
-------------- Wed Apr 05 14:11:51 CDT 2017
DeviceId:81-00000020cc90
DeviceId:01-0000098b285f
-------------- Wed Apr 05 14:11:52 CDT 2017
DeviceId:81-00000020cc90
DeviceId:01-0000098b285f
public class OneWireViewer {
public static void main(String[] args) throws IOException {
final Console console = new Console();
console.title("Iniciando OneWireViewer");
console.promptForExit();
W1Master w1Master = new W1Master();
W1MasterWatcher w1MW = new W1MasterWatcher(w1Master);
W1Device w1d;
while (console.isRunning()) {
console.println("-------------- "+new Date().toString());
try {
for (String deviceId : w1Master.getDeviceIDs()) {
console.println("DeviceId:"+deviceId); }
for (W1Device device : w1Master.getDevices()) {
console.println("Value:"+device.getValue()+" toString:"+device.toString());
}
Thread.sleep(1000);
} catch (InterruptedException ex) {
Logger.getLogger(OneWireViewer.class.getName()).log(Level.SEVERE, null, ex);
}
}
console.println("Fin.");
}
}
2.- If I have two DS9490R How can i distinguish the master where Ibutton DS1990 is connected?
3.- How can i make more quick the detection of presence or absence of Ibutton on DS9490R? in this demo takes aprox 2 seconds to detect prescence and 100 seconds to detect absence.