So something weird happens. Whenever I want to play a sound on my buzzer it plays through my ultrasonic sensors and it doesn't matter if I change the port on the Arduino, it keeps routing it through my ultrasonic sensors. In my code the ultrasonic sensors pins are not even declared just the buzzer's ones.
Code ex :
int i=0;
void setup() {
pinMode(11, OUTPUT);
}
void loop() {
for(i=700;i<800;i++){
tone(9,i);
delay(15);
}
for(i=800;i>700;i--){
tone(9,i);
delay(15);
}
}
I have another code which includes ultrasonic sensors and the other stuff but this one doesn't. It may be some residue from the last uploadings ?