/*Write the code to make sure that whenever the horn reach pos 180 it needs to go back to position 0
and change the color of horn to yellow*/
#include <Servo.h>
Servo myservo;
int pos=0;
void setup() {
// put your setup code here, to run once:
myservo.attach(9);
}
void loop() {
// put your main code here, to run repeatedly:
//Create a if condition that if the pos value becomes greater the 180 then the pos will be reset to 0
if(pos>180){
pos = 0;
}
delay(100);
pos = pos +1;
myservo.write(pos);
}