Files
MySensors/libraries/DigitalIO/examples/PinIOReadWrite/PinIOReadWrite.ino
T
Henrik Ekblad 2fd948fc66 Add new scene controller with touch display example.
Upgraded RF24 to latest version which supports SoftSPI. 
Added DigitalIO and UTFT libraries to support the new example.
Fix problem reported in RelayWithButtonActuator example.
2014-10-17 00:01:55 +02:00

16 lines
294 B
Arduino

// Read pin 12 and write the value to pin 13.
#include <DigitalIO.h>
PinIO readPin(12);
PinIO writePin(13);
void setup() {
// Set input mode and disable pull-up.
readPin.config(INPUT, LOW);
// set output mode
writePin.mode(OUTPUT);
}
void loop() {
writePin.write(readPin.read());
}