the problem is de code below yes. E1 = pin 5 of pwm, E2 = pin 6 pwm en digital pin 7 en 4 are M1 and M2
analogWrite(E1, 255); //PWM Speed Control
analogWrite(E2, 255); //PWM Speed Control
delay(30);
digitalWrite(M1, HIGH);
digitalWrite(M2, HIGH);
the SRF08 is connected to analog pin A5(SCL) en A4(SDA) of the arduino uno. It seems to be interfering because when i read the sensor without using above pwm code it works fine :~
MySonar is the class to read the srf08.