From: Vladimir Garistov Date: Mon, 16 Oct 2023 12:43:15 +0000 (+0300) Subject: Added register GPIO example with multiple pins X-Git-Url: https://kolegite.com/gitweb/?a=commitdiff_plain;h=4b5275cf31b67f1528b7bedb0eafd85c1c4e4298;p=vmks.git Added register GPIO example with multiple pins --- diff --git a/Examples/GPIO/Register_multiple/Register_multiple.ino b/Examples/GPIO/Register_multiple/Register_multiple.ino new file mode 100644 index 0000000..68153ea --- /dev/null +++ b/Examples/GPIO/Register_multiple/Register_multiple.ino @@ -0,0 +1,25 @@ +void setup() +{ + pinMode(8, OUTPUT); + pinMode(9, OUTPUT); + pinMode(10, OUTPUT); + pinMode(11, OUTPUT); + digitalWrite(8, LOW); + digitalWrite(9, LOW); + digitalWrite(10, HIGH); + digitalWrite(11, HIGH); +} + +void loop() +{ + delay(100); + digitalWrite(8, HIGH); + digitalWrite(9, HIGH); + digitalWrite(10, LOW); + digitalWrite(11, LOW); + delayMicroseconds(50); + digitalWrite(8, LOW); + digitalWrite(9, LOW); + digitalWrite(10, HIGH); + digitalWrite(11, HIGH); +}