Arduino Pin Library  v4.2.0
An easy to use Arduino library for fast and simultaneous operations on Arduino I/O pins.
Pin-Array.ino
#include <Pin.h> // Include Pin Library
Pin myPins[] = {2,3,4,5,6,7,8,9}; // Create array of Pin objects for digital pins labelled 2-9 on any of the supported boards
int myPinsSize = sizeof(myPins) / sizeof(Pin); // Store the length of the array of Pins
void setup() {
for (int i = 0; i < myPinsSize; i++) { // Iterate over array of Pins
myPins[i].setOutput(); // Set Pin to output
}
}
void loop() {
for (int i = 0; i < myPinsSize; i++) { // Iterate over array of Pins
myPins[i].setLow(); // Set Pin to low
}
delay(200); // Wait 200 milliseconds
for (int i = 0; i < myPinsSize; i++) { // Iterate over array of Pins
myPins[i].setHigh(); // Set Pin to high
}
delay(200); // Wait 200 milliseconds
}