September 17, 2022

PELATIHAN IoT SEAMOLEC (LAMPU LALU LINTAS SIMPANG 3)

void setup() { // put your setup code here, to run once: pinMode(21, OUTPUT); pinMode(19, OUTPUT); pinMode(18, OUTPUT); pinMode(23, OUTPUT); pinMode(22, OUTPUT); pinMode(5, OUTPUT); pinMode(4, OUTPUT); pinMode(2, OUTPUT); pinMode(15, OUTPUT);; } void loop() { // put your main code here, to run repeatedly: delay(10); digitalWrite(21, HIGH);//menghidupkan led delay(5000); // this speeds up the simulation digitalWrite(21, LOW);//mematikan led delay(10); digitalWrite(19, HIGH); delay(1000); digitalWrite(19, LOW); delay(10); digitalWrite(18, HIGH); delay(7000); digitalWrite(18, LOW); delay(10); digitalWrite(23, HIGH);//menghidupkan led delay(5000); // this speeds up the simulation digitalWrite(23, LOW);//mematikan led delay(10); digitalWrite(22, HIGH); delay(1000); digitalWrite(22, LOW); delay(10); digitalWrite(5, HIGH); delay(7000); digitalWrite(5, LOW); delay(10); digitalWrite(4, HIGH);//menghidupkan led delay(5000); // this speeds up the simulation digitalWrite(4, LOW);//mematikan led delay(10); digitalWrite(2, HIGH); delay(1000); digitalWrite(2, LOW); delay(10); digitalWrite(15, HIGH); delay(7000); digitalWrite(15, LOW); delay(10); }

0 comments:

Post a Comment