Example #1
0
        public override void Connect()
        {
            try
            {
                if (arduinoHandle.Connect())
                {
                    LogHandler.WriteLog(base.division, string.Format("{0} :: Connect() Success", this.ToString()));

                    base.isConnect = true;
                }
                else
                {
                    LogHandler.WriteLog(base.division, string.Format("{0} :: Connect() Fail", this.ToString()));

                    base.isConnect = false;
                }
            }
            catch (Exception ex)
            {
                LogHandler.WriteLog(base.division, string.Format("{0} :: Connect() Exception :: Message = {1}", this.ToString(), ex.Message));

                base.isConnect = false;
            }
        }