void MPU6050::begin(uint32_t speed) { i2cBegin(speed); writeByte(SlaveAddress,PWR_MGMT_1,0); writeByte(SlaveAddress,SMPLRT_DIV,0x07); writeByte(SlaveAddress,CONFIG,0x06); writeByte(SlaveAddress,GYRO_CONFIG,0x18); writeByte(SlaveAddress,ACCEL_CONFIG,0x01); writeByte(SlaveAddress,PWR_MGMT_1,0); writeByte(SlaveAddress,SMPLRT_DIV,0x07); writeByte(SlaveAddress,CONFIG,0x06); writeByte(SlaveAddress,GYRO_CONFIG,0x18); writeByte(SlaveAddress,ACCEL_CONFIG,0x01); }
/*----------------------------------------------------------------------* * Constructor. * *----------------------------------------------------------------------*/ DS3232RTC::DS3232RTC() { i2cBegin(); }