void digipot_i2c_init() {
  const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
  Wire.begin();
  // setup initial currents as defined in Configuration_adv.h
  for (int i = 0; i < COUNT(digipot_motor_current); i++)
    digipot_i2c_set_current(i, digipot_motor_current[i]);
}
Пример #2
0
void digipot_i2c_init() {
  const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;

  for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
    pots[i].i2c_init();

  // setup initial currents as defined in Configuration_adv.h
  for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
    digipot_i2c_set_current(i, digipot_motor_current[i]);
}