plz i need the block code i have all the answer expt the block code
PART 3 150 points) Write an Arduino code to simulate the traffic light that you recorded in Part 1. Paste both Block code and Text code in the boxes below. Block Code: Text Code: ..-101 ANALOG IN ..... ...10 DIGIT OO UNO POWER -.. .... ARDUINO DI .... ..- ..11 ... S. ..... .. ..... .... - .. Find real traffic light in your area and record with a stopwatch how much time takes for each light to turn on. East Red light Yellow light Green light Seconds 120 10 50 West Red light Yellow light Green light Seconds 117 9 55 South Red light Yellow light Green light Seconds 130 7 60 North Red light Yellow light Green light Seconds 125 8 57 fine ER 2 define EY 3 define EG 4 #define WR 5 define WY 6 #define WG 7 define SR 8 define SY 9 define SG 10 define NR 11 define NY 12 define NG 13 void cast(); void west() void south(); void north(); 11 the setup routine runs once when you press reset: void setup() { pinMode(ER, OUTPUT); pinMode(BY, OUTPUT); pinMode(EG, OUTPUT); pinMode(WR, OUTPUT); pinMode(WY, OUTPUT) pinMode(WG, OUTPUT); pinMode(SR, OUTPUT); pinMode(SY, OUTPUT); pinMode(SG, OUTPUT); pinMode(NR, OUTPUT); pinMode(NY, OUTPUT); pinMode(NG, OUTPUT); void loop() { east(): west(); south(); north(); void east) digitalWrite(ER, HIGH); digitalWrite(EY, LOW) digitalWrite(EG, LOW); delay( 120000); digitalWrite(ER, LOW); digitalWrite(EY, HIGH); digitalWrite(EG, LOW); delay(10000) digitalWrite(ER, LOW); digitalWrite(EY, LOW); digitalWrite(EG, HIGH); delay(50000); > void west() { digitalWrite(WR, HIGH); digitalWrite(WY, LOW); digitalWrite(WG, LOW); delay(117000); digitalWrite(WR, LOW); digitalWrite(WY, HIGH); digitalWrite(WG, LOW) delay (9000); digitalWrite(WR, LOW); digitalWrite(WY, LOW); digitalWrite(WG, HIGH); delay(55000); void loop() east west(); south(); north(); void cast) digitalWrite(ER, HIGH); digitalWrite(EY, LOW); digitalWrite(EG, LOW); delay(120000); digitalWrite(ER, LOW); digitalWrite(EY, HIGH); digitalWrite(EG, LOW); delay(10000): digitalWrite(ER, LOW); digitalWrite(EY, LOW); digitalWrite(EG, HIGH); delay(50000); > void west() digitalWrite(WR, HIGH); digitalWrite(WY, LOW); digitalWrite(WG, LOW); delay(117000); digitalWrite(WR, LOW); digitalWrite(WY, HIGH); digitalWrite(WG, LOW); delay (9000); digitalWrite(WR, LOW); digitalWrite(WY, LOW); digitalWrite(WG, HIGH); delay(55000); > void south) digitalWrite(SR, HIGH); digitalWrite(SY, LOW); digitalWrite(SG, LOW); delay(130000); digitalWrite(SR, LOW); digitalWrite(SY, HIGH); digitalWrite(SG, LOW); delay(60000); digitalWrite(SR, LOW); digitalWrite(SY, LOW); digitalWrite(SG, HIGH); delay( 7000); void north digitalWrite(NR, HIGH); digitalWrite(NY, LOW); digitalWrite(NG, LOW); delay(125000); digitalWrite(NR, LOW); digitalWrite(NY, HIGH); digitalWrite(NG, LOW); delay(8000); digitalWrite(NR, LOW); digitalWrite(NY, LOW); digitalWrite(NG, HIGH); delay(57000)