From ac2a3294ba38f36f1832347e1261dbc6baa2f54a Mon Sep 17 00:00:00 2001 From: copplestone <gracecopplestone@gmail.com> Date: Fri, 24 Mar 2017 17:15:40 -0400 Subject: [PATCH] example code added --- example.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 example.txt diff --git a/example.txt b/example.txt new file mode 100644 index 0000000..db4c94f --- /dev/null +++ b/example.txt @@ -0,0 +1,15 @@ +// measure frequency of the in or out pin in reference to ground +// bridge the in and out pin using a jumper to allow for the transfer of information + +const int in = 0; +const int out = 1; + +void setup() { + pinMode(in, INPUT); + pinMode(out, OUTPUT); + digitalWrite(out, LOW); +} + +void loop() { + digitalWrite(out, 1 - digitalRead(in)); +} \ No newline at end of file -- GitLab