Skip to main content

Posts

Featured

Servo Moter Control Through IR Sensor And Arduino

 Coding to program servo and ir sensor By P.M.Prathmesh   Code :- #include <Servo.h> const int analogInPin = A0; int sensorValue = 0;                int servoPin = 9; int i = 0; Servo servo; void setup() {   servo.attach(servoPin); } void loop() {     sensorValue = analogRead(analogInPin);                if(sensorValue < 600){     for (int i = 0; i<=180; i++){     servo.write(i);     delay(10);    }   }   servo.write(i);                        } Download This Code (Click Here)

Latest posts