Grove_I2C_Motor_Driver.cpp
// *********************************Initialize*********************************
// Initialize I2C with an I2C address you set on Grove - I2C Motor Driver v1.3
// default i2c address: 0x0f
Initialize
Initialize I2C with an I2C address you set on Grove - I2C Motor Driver v1.3
default i2c address: 0x0f
Initialize Initialize I2C with an I2C address you set on Grove - I2C Motor Driver v1 . 3 default i2c address : 0x0f
int I2CMotorDriver::begin(unsigned char i2c_add) {
    if (i2c_add > 0x0f) {
        Serial.println("Error! I2C address must be between 0x00 to 0x0F");
        return (-1); 
    }
    Wire.begin();
    delayMicroseconds(10000);
    this->_i2c_add = i2c_add;
    frequence(F_3921Hz);
    return (0); 
}
int I2CMotorDriver :: begin ( unsigned char i2c_add ) { if ( i2c_add > 0x0f ) { Serial . println ( " " ) ; return ( -1 ) ; } Wire . begin ( ) ; delayMicroseconds ( 10000 ) ; this -> _i2c_add = i2c_add ; frequence ( F_3921Hz ) ; return ( 0 ) ; }
Initialize
Initialize I2C with an I2C address you set on Grove - I2C Motor Driver v1.3
default i2c address: 0x0f
Initialize Initialize I2C with an I2C address you set on Grove - I2C Motor Driver v1 . 3 default i2c address : 0x0f
// I2C address error // Set default frequence to F_3921Hz // OK