First testing tool for your LEDs and your Switches
This commit is contained in:
10
README.md
10
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.
|
||||||
|
|||||||
10
tools/testing/README.md
Normal file
10
tools/testing/README.md
Normal 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
24
tools/testing/testing.ino
Normal 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);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user