i'm trying to simplify this code. somehow i cant get the correct output when i use the code below. the outputs i tested it manually one by one first combination of high and low. now i want to use a different method for easier.
4 led anode to cathode
pin 15 led 1 pin 11
pin 14 led 2 pin 10
pin 13 led 3 pin 9
pin 12 led 4 pin 8
TABLE 1 - COMBINATION
SETUP 1(A) 2(B) 3(C)
1 L L L
2 L L H
3 L H L
4 L H H
5 H L L
6 H L H
7 H H L
8 H H H
TABLE 2 - ACTIVE LED OUTPUT
SETUP 1 2 3 4 5 6 7 8
1 NO 1 NO 1,3 NO 1,2 NO 1,3,4
2 1 1 1 1,3 2,3 1,2 1,2,4 1,2,3,4
3 NO 1 NO 3 NO 1,2,3 NO 3,4
4 1,3 1,3 1 3 2,3,4 1,2,3,4 2,4 2,4
5 NO 1,2 NO 2,3,4 NO 2 NO 2,4
6 NO 1,2 1,2 1,2,3,4 2 2 2,4 2,4
7 NO 1,2,4 NO 4 NO 2,4 NO 4
8 1,4 1,2,4 4 2,4 2,4 2,4 4 4
thanks for the help
_74138Case.ino (2.36 KB)