From 4b5275cf31b67f1528b7bedb0eafd85c1c4e4298 Mon Sep 17 00:00:00 2001 From: Vladimir Garistov Date: Mon, 16 Oct 2023 15:43:15 +0300 Subject: [PATCH] Added register GPIO example with multiple pins --- .../Register_multiple/Register_multiple.ino | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Examples/GPIO/Register_multiple/Register_multiple.ino 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); +} -- 2.39.5