pet feeder project(automatic) using arduino and ir sensor arduino projects
Pet Feeder Arduino Code #include<Servo.h>//How to make a Pet Feeder Servo myServo; constint irPin = 7; // IR sensor connected to pin 2 int irState = 0; voidsetup(){ pinMode(irPin, INPUT); myServo.attach(9); // Servo connected to pin 9 myServo.write(40); // Initial position } voidloop(){ irState = digitalRead(irPin); if(irState == … Read more