Hi, I want to read four pin state and convert them to decimal so that i can use them with switch statements to control a relay. For ex, If the pins read 0001 , (do something) If the pins read 0101, (do something)
I need to take inputs on pins ranging from 0001 to 1100 matching each case to a certain task. I tried using else if, but the program gets very big. Is there any simpler way to do this?