From 4fedc6e607b5a71ce91de9291bf4573b8bb36703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20B=C3=BChrig?= Date: Mon, 12 Jan 2015 12:07:51 +0100 Subject: [PATCH] First testing tool for your LEDs and your Switches --- README.md | 10 ++++++++++ tools/testing/README.md | 10 ++++++++++ tools/testing/testing.ino | 24 ++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 tools/testing/README.md create mode 100644 tools/testing/testing.ino diff --git a/README.md b/README.md index e69de29..7b460d2 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,10 @@ += MIDI BOARD TWO + +== Second MIDI-Board-Project with SD-Card-Reader and LCD-Display! + +=== Testing Tool + +This tool is only a testing tool. If you upload it to your Arduino Device, all LEDs will be switched on. After it, you can +switch out all the LEDs if you press all your Buttons. + +Only for testing your circuit. diff --git a/tools/testing/README.md b/tools/testing/README.md new file mode 100644 index 0000000..7b460d2 --- /dev/null +++ b/tools/testing/README.md @@ -0,0 +1,10 @@ += MIDI BOARD TWO + +== Second MIDI-Board-Project with SD-Card-Reader and LCD-Display! + +=== Testing Tool + +This tool is only a testing tool. If you upload it to your Arduino Device, all LEDs will be switched on. After it, you can +switch out all the LEDs if you press all your Buttons. + +Only for testing your circuit. diff --git a/tools/testing/testing.ino b/tools/testing/testing.ino new file mode 100644 index 0000000..b236bb4 --- /dev/null +++ b/tools/testing/testing.ino @@ -0,0 +1,24 @@ +void setup() { + Serial.begin(9600); + for(int i=22; i <= 36; i=i+2) { + pinMode(i, INPUT); + pinMode(i+1, OUTPUT); + } + + for(int i=22; i <= 36; i=i+2) { + digitalWrite(i+1, HIGH); // turn the LED on (HIGH is the voltage level) + delay(100); // wait for a second + digitalWrite(i+1, LOW); // turn the LED off by making the voltage LOW + delay(100); + } +} + +void loop() { + + for(int i=22; i <= 36; i=i+2) { + byte actState = digitalRead(i); + digitalWrite(i+1, actState); + + + } +}