Esempio n. 1
0
        public NativeI2CBus(Socket socket, ushort address, int clockRateKhz, Module module)
        {
            if (_device == null)
                _device = new Hardware.I2CDevice(new Hardware.I2CDevice.Configuration(0, 50));

            _configuration = new Hardware.I2CDevice.Configuration(address, clockRateKhz);
        }
Esempio n. 2
0
        public NativeI2CBus(Socket socket, ushort address, int clockRateKhz, Module module)
        {
            if (_device == null)
            {
                _device = new Hardware.I2CDevice(new Hardware.I2CDevice.Configuration(0, 50));
            }

            _configuration = new Hardware.I2CDevice.Configuration(address, clockRateKhz);
        }
        private HardwareFactory()
        {
            var config = new Microsoft.SPOT.Hardware.I2CDevice.Configuration(0x51, 400);

            i2cDevice      = new Microsoft.SPOT.Hardware.I2CDevice(config);
            accelSensor    = new AccelerometerSensor(i2cDevice);
            tempSensor     = new TemperatureSensor(i2cDevice);
            relay          = new Relay();
            emulatorLogger = new SimulatorLogger(i2cDevice);
        }
Esempio n. 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="address">Optional I2C address</param>
 public BNO055(byte address = BNO055_ADDRESS_A)
 {
     _Configuration = new Microsoft.SPOT.Hardware.I2CDevice.Configuration(address, 400);
 }