hi I have 8 leds that I want to light up different combinations of at different times. I have found the best way is to use binary numbers i.e 0b10101010 etc etc. However I have a lot of combinations so I am making #defines for the combinations i.e:
#define comb1 0b01010101
etc etc. I want someone else to be able to edit/add combinations so I want to make a completely seperate file that contains just these. However depending on other conditions within the program one combination can mean two different things. i.e if the user makes a selection, then the combination of leds coming on could be 0b01010101 which due to that selection means something different to a different selection even though the same led's come on. So I want library files that each contain all the combinations for the right situations depending on what selection a user makes. I think I cna just do it with header files somehow, i.e create a header file for one selection with all the defines in, and another header file with all the combinations in for a different user selection, but how to get the program to select a define from one header file rather than another if the names of the defines are the same?
As a basic example, if the user can make a selection of Boy or girl. Then the user selects hair colour, blonde brown red. Depending on the selection, depends on what leds come on, however the defines would be called the same (blonde brown red) but may have different binary values, so if I have two header files, boy.h and girl.h how does the program know which define to select? I think that might sound confusing but hopefully someone understands my example?