mirror of
https://github.com/mysensors/MySensors.git
synced 2026-03-20 06:57:02 +01:00
The rules are in .tools/astyle/config/style.cfg and can also be reviewed at https://www.mysensors.org/view/260#coding-guidelines-core-library
18 lines
289 B
C++
18 lines
289 B
C++
// 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());
|
|
} |