Ejemplo n.º 1
0
        private void textReadTem(object sender, object e)
        {
            Temperature = arduino.analogRead("A1");

            ConnectTheDotsSensor sensor1 = ctdHelper1.sensors.Find(item => item.guid == "2198a348-e2f9-4438-ab23-82a3930662ac");

            sensor1.value = arduino.analogRead("A1") * (5 / 10.24);
            ctdHelper1.SendSensorData(sensor1);
        }
Ejemplo n.º 2
0
 public void SendSensorData(ConnectTheDotsSensor sensor)
 {
     sensor.timecreated = DateTime.UtcNow.ToString("o");
     sendMessage(sensor.ToJson());
 }