Hello,
I have to read 4 different analog voltage sources depending on 4bit digital input. I want to assign digital pin 2, 3, 4 and 5. There are 16 combinations (0000, 0001, 0010,....)
When digital pins (2, 3, 4, 5) are assigned as 0000 then I have to ready Vout1.
When digital pins (2, 3, 4, 5) are assigned as 0001 then I have to ready Vout1.
When digital pins (2, 3, 4, 5) are assigned as 0010 then I have to ready Vout1.
When digital pins (2, 3, 4, 5) are assigned as 0011 then I have to ready Vout1.
When digital pins (2, 3, 4, 5) are assigned as 0100 then I have to ready Vout2.
....
....
When digital pins (2, 3, 4, 5) are assigned as 1111 then I have to ready Vout4.
Should I define digital pins in an array? How can I do this digital write and read analog voltage?