Пример #1
0
        /// <summary>
        /// Start the SingleTact, using an Arduino Interface Object
        /// </summary>
        /// <param name="arduino">Arduino Interface</param>
        public void Initialise(ArduinoSingleTactDriver arduino)
        {
            arduino_ = arduino;

            PullSettingsFromHardware();

            isConnected  = false;
            isCalibrated = false;
        }
Пример #2
0
        /// <summary>
        /// Start the SingleTact, using an Arduino Interface Object
        /// </summary>
        /// <param name="arduino">Arduino Interface</param>
        /// <returns>true if successful; false otherwise.</returns>
        public bool Initialise(ArduinoSingleTactDriver arduino)
        {
            arduino_ = arduino;

            if (!PullSettingsFromHardware())
            {
                return(false);
            }

            isUSB           = arduino_.isUSB;
            isConnected     = false;
            isCalibrated    = (Settings.Calibrated == 1) ? true : false;
            firmwareVersion = Settings.FirmwareVersion;
            return(true);
        }
Пример #3
0
 public bool Initialise(string portName)
 {
     try
     {
         _frameList  = new List <SingleTactFrame>();
         _singleTact = new SingleTact();
         _arduino    = new ArduinoSingleTactDriver();
         _arduino.Initialise(portName); //Start Arduino driver
         _singleTact.Initialise(_arduino);
         _singleTact.I2cAddressForCommunications = ((byte)(4));
         isCalibrated = _singleTact.isCalibrated;
         return(true);
     }
     catch
     {
         return(false);
     }
 }