First testing tool for your LEDs and your Switches

This commit is contained in:
2015-01-12 12:07:51 +01:00
parent 7c4ee3720f
commit 4fedc6e607
3 changed files with 44 additions and 0 deletions

View File

@@ -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.

10
tools/testing/README.md Normal file
View File

@@ -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.

24
tools/testing/testing.ino Normal file
View File

@@ -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);
}
}