Пример #1
0
        private void SensorsSetup()
        {
#if HEART_RATE
            BlueNRG_HRMSettings settings =
                new BlueNRG_HRMSettings
                {
                    Address = BlueNRG_HRM_ADDR
                };

            this.blueNGR_HRM = new BlueNRG_HRM(settings);

            this.blueNGR_HRM.SensorValueChanged += device_SensorValueChanged;

            this.blueNGR_HRM.Open();
#else
            // setup TI Sensor Tag
            TISensorTagSettings settings =
                new TISensorTagSettings
                {
                    Address = TI_SENSORTAG_ADDR,
                    IsTemperatureEnabled = true,
                    IsHumidityEnabled = true,
                    IsAccelerometerEnabled = true,
                    Period = 100
                };

            this.tiSensorTag = new TISensorTag(settings);

            // set notification handlers
            this.tiSensorTag.SensorValueChanged += device_SensorValueChanged;

            // open connection and start reading from sensors
            this.tiSensorTag.Open();
#endif
        }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings">BlueNRG_HRM settings</param>
 public BlueNRG_HRM(BlueNRG_HRMSettings settings)
 {
     this.Settings = settings;
     this.bag = new Hashtable();
 }
Пример #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings">BlueNRG_HRM settings</param>
 public BlueNRG_HRM(BlueNRG_HRMSettings settings)
 {
     this.Settings = settings;
     this.bag      = new Hashtable();
 }