Exemplo n.º 1
0
 public Tcs34725(I2cBus i2c, byte address, Tcs34725IntegrationTime it, Tcs34725Gain gain)
     : base(i2c, address)
 {
     _tcs34725Initialised     = false;
     _tcs34725IntegrationTime = it;
     _tcs34725Gain            = gain;
 }
Exemplo n.º 2
0
        /*!
         *  @brief  Adjusts the gain on the TCS34725
         *  @param  gain
         *          Gain (sensitivity to light)
         */

        public void SetGain(Tcs34725Gain gain)
        {
            if (!_tcs34725Initialised)
            {
                Init();
            }

            /* Update the timing register */
            WriteByte(TCS34725_CONTROL | TCS34725_COMMAND_BIT, (byte)gain);

            /* Update value placeholders */
            _tcs34725Gain = gain;
        }
Exemplo n.º 3
0
 public Tcs34725(I2cBus i2c, Tcs34725IntegrationTime it, Tcs34725Gain gain)
     : this(i2c, TCS34725_ADDRESS, it, gain)
 {
 }