Arduino Pin Library v4.2.2
An easy to use Arduino library for fast and simultaneous operations on Arduino I/O pins.
Loading...
Searching...
No Matches
Pin-Custom.ino
#include <Pin.h> // Include Pin Library
Pin myPin = Pin(13, 1<<7, TIMER0A, &PINB, &PORTB, &DDRB); // Create Pin object for digital pin labelled 13 on Arduino Mega, getAnalogValue() and setDutyCycle(int value) not supported
void setup() {
myPin.setOutput(); // Set Pin to output mode
myPin.setHigh(); // Set Pin to output high
}
void loop() {
myPin.toggleState(); // Set Pin to output the opposite of the previous output (HIGH -> LOW, LOW -> HIGH)
delay(200); // Wait 200 milliseconds
}
Fast operations on Arduino I/O pins.
Class for fast operations on Arduino I/O pins.
Definition Pin.h:40
void setHigh()
Set the pin output to HIGH.
Definition Pin.h:349
void setOutput()
Set the pin mode to output.
Definition Pin.h:339
void toggleState()
Toggle the pin state (HIGH -> LOW, LOW -> HIGH)
Definition Pin.h:410