int motionPin_70 = 51;
int motionPin_65 = 53;
int count = 0;
#define Red_1 11
#define Red_2 6
#define Red_3 39
#define Red_4 49
#define Yellow_1 10
#define Yellow_2 5
#define Yellow_3 37
#define Yellow_4 47
#define Green_1 9
#define Green_2 4
#define Green_3 35
#define Green_4 45
#define MP_U_1 12
#define MP_U_2 13
#define MP_R_1 7
#define MP_R_2 8
#define MP_D_1 41
#define MP_D_2 43
#define MP_L_1 51
#define MP_L_2 53
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(motionPin_65, INPUT);
pinMode(motionPin_70, INPUT);
}
void loop() {
count = count + 1;
Serial.println(count);
int motion_70 = digitalRead(motionPin_70);
int motion_65 = digitalRead(motionPin_65);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
delay(5000);
// Serial.println(motion_70);
// Serial.println(motion_65);
if(motion_70 == HIGH && motion_65 == LOW) {
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
delay(3000);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
delay(3000);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
delay(3000);
}
}
void normal() {
}