Arduino Pin Library  v4.2.0
An easy to use Arduino library for fast and simultaneous operations on Arduino I/O pins.
Go to the documentation of this file.
8 #include <Pin.h> // Include Pin Library
10 Pin myPin = Pin(13); // Create Pin object for digital pin labelled 13 on any of the supported boards
15 void setup() {
16  myPin.setOutput(); // Set Pin to output mode
17  myPin.setHigh(); // Set Pin to output high
18 }
23 void loop() {
24  myPin.toggleState(); // Set Pin to output the opposite of the previous output (HIGH -> LOW, LOW -> HIGH)
26  delay(200); // Wait 200 milliseconds
27 }
void setHigh()
Set the pin output to HIGH.
Definition: Pin.h:365
Class for fast operations on Arduino I/O pins.
Definition: Pin.h:39
void setup()
Called at start.
Definition: Pin-Toggle.ino:15
void setOutput()
Set the pin mode to output.
Definition: Pin.h:355
Fast operations on Arduino I/O pins.
void toggleState()
Toggle the pin state (HIGH -> LOW, LOW -> HIGH)
Definition: Pin.h:431
Pin myPin
Definition: Pin-Toggle.ino:10
void loop()
Called continously after setup.
Definition: Pin-Toggle.ino:23