difficult IC pinouts


sometimes using ic difficult pinout... example, 16-channel led driver ic order of channel pins isn't same order leds lined in.

generally create array follows:

code: [select]
byte ledpin[] = {14, 11, 5, 2, 6, 3, 12, 18, 13, 7, 8, 9, 4, 10, 16, 15};

and when want call light 7th led call upon ledpin[7].
is best/simplest way of remapping pins difficult ics?  can suggest other ways?

thanks
jonathan

depending on how accessing leds, use #define

e.g

code: [select]

#define led7 13
// etc


but array method may more appropriate depending if need access leds sequentially

btw, ledpin[7]. eighth element in array first element index zero


Arduino Forum > Using Arduino > General Electronics > difficult IC pinouts


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support