//Connect ALL the expected conenctions properly, including the SERVO MOTORS
//Construct it such that if the PIR detects motion, the LED lights up and the SERVOs move.
//Add the ecessary codes, especially on to SERVOs.
#include <Servo.h>
int No1;
int No2;
int No3;
int ledred = 13;
int PIRsensor = 8;
int servopin1 =5;
int servopin2 =6;
int servopin3 =7;
boolean start = false;
void setup() {
// put your setup code here, to run once:
No1.attach(servopin1);
No2.attach(servopin2);
No3.attach(servopin3);
Serial.begin(9600);
pinMode (ledred, OUTPUT);
pinMode (PIRsensor, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(PIRsensor) == HIGH) {
digitalWrite (ledred, HIGH);
Serial.println("Motion detected");
}
else {
digitalWrite (ledred, LOW);
Serial.println("Motion stopped.");
No1.write()
}
}