DC motor on I2C Motor Driver(L298): PWM is 25Hz and can’t be changed

Hello Seraphina,

I performed some test with the following program:

#include "Grove_I2C_Motor_Driver.h"
#define I2C_ADDRESS 0x0f
void setup() {
  Motor.begin(I2C_ADDRESS);
  Motor.speed(MOTOR1, 50);
  Motor.speed(MOTOR2, 50);
  Serial.begin(9600);
}
void loop() {
  Serial.println("3");
  Motor.frequence(1);
  delay(2000);
  Serial.println("50");
  Motor.frequence(50);
  delay(2000);
}

With the original library, the result is:

Because 50 is not a valid argument (as stated in my last post)

I tried to comment in the library:

if (_frequence < F_31372Hz || _frequence > F_30Hz) {
		Serial.println("frequence error! Must be F_31372Hz, F_3921Hz, F_490Hz, F_122Hz, F_30Hz");
		return;

But this don’t allow the frequency to change: with the new firmware, frequency is now 9.36Hz so worse than the original 25Hz before upgrade.