For shifting out data to leds I need to convert individual settings stored in boolean/integer/char (1 = on, 0 = off) from binary to decimal. For example:
Led1: on 1 Led2: on 1 Led3: off 0 Led4: on 1
settings: 1101 decimal value: 13
In processing, this can be done very easily with the unbinary() function. But how would I do that in Arduino?
Thanks for any help! yves