Exemplo n.º 1
0
        public static bool QueryIndividualArduinoDevice(string com_port)
        {
            BehaviorBoard b       = new BehaviorBoard();
            bool          success = b.ConnectToArduino(com_port);

            if (success)
            {
                //Get the booth number
                int booth_number = b.GetBoothNumber();

                //Disconnect from the Arduino
                b.DisconnectFromArduino();

                //Update the booth pairing
                JawBoothConfiguration.GetInstance().UpdateBoothPairing(com_port, booth_number.ToString());
                JawBoothConfiguration.GetInstance().SaveBoothPairings();

                return(true);
            }
            else
            {
                return(false);
            }
        }