]> kolegite.com Git - vmks.git/commitdiff
Added register GPIO example with multiple pins
authorVladimir Garistov <vl.garistov@gmail.com>
Mon, 16 Oct 2023 12:43:15 +0000 (15:43 +0300)
committerVladimir Garistov <vl.garistov@gmail.com>
Mon, 16 Oct 2023 12:43:15 +0000 (15:43 +0300)
Examples/GPIO/Register_multiple/Register_multiple.ino [new file with mode: 0644]

diff --git a/Examples/GPIO/Register_multiple/Register_multiple.ino b/Examples/GPIO/Register_multiple/Register_multiple.ino
new file mode 100644 (file)
index 0000000..68153ea
--- /dev/null
@@ -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);  
+}