コード例 #1
0
 private void button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         foreach (var device in _ds2482_100.GetDevices <DS18B20>())
         {
             var result = device.GetTemperature();
             this.textBox.Text = result.ToString();
         }
     }
     catch (Exception exception)
     {
         this.textBox.Text = exception.Message;
     }
 }
コード例 #2
0
 public void InitializeProbes()
 {
     sensors = ds2482.GetDevices <DS18B20>();
     Task.Delay(TimeSpan.FromSeconds(3)).Wait();
 }