Ejemplo n.º 1
0
 /// <summary>
 /// Establishes I2C connection to MPU6050, Initializes and gets Gyro offsets.
 /// </summary>
 public IMU_I2C(byte address)
 {
     _I2C = new MultiI2C(address, MAX_FREQ);
     Thread.Sleep(10);
     Initialize();
     Thread.Sleep(10);
     Callibrate();
 }
Ejemplo n.º 2
0
        // When the display powers up, it is configured as follows:
        //
        // 1. Display clear
        // 2. Function set:
        //    DL = 1; 8-bit interface data
        //    N = 0; 1-line display
        //    F = 0; 5x8 dot character font
        // 3. Display on/off control:
        //    D = 0; Display off
        //    C = 0; Cursor off
        //    B = 0; Blinking off
        // 4. Entry mode set:
        //    I/D = 1; Increment by 1
        //    S = 0; No shift
        //
        // Note, however, that resetting the Arduino doesn't reset the LCD, so we
        // can't assume that its in that state when a sketch starts (and the
        // LiquidCrystal constructor is called).

        #region "Constructors and Initializers"

        public LiquidCrystal_I2C(byte lcd_Addr, byte lcd_cols, byte lcd_rows)
        {
            LCDLock = new object();

            _Addr         = lcd_Addr;
            _cols         = lcd_cols;
            _rows         = lcd_rows;
            _backlightval = DefineConstants.LCD_NOBACKLIGHT;
            _I2C          = new MultiI2C(lcd_Addr, MAX_FREQ);
            begin(_cols, _rows);
        }