Example #1
0
        public string SubmitNotificationHumedad([FromBody] NotificationViewModel notification)
        {
            Console.WriteLine($"{notification.Id}");
            SerialCommunication.Inicialize();
            SerialCommunication.Write($"#HUMEI{notification.Id}#\n");
            var lectura = SerialCommunication.ReadLine();

            SerialCommunication.Close();

            var value = lectura.Substring(0, lectura.Length - 1);

            return(value);
        }