for example, if i have an register 0x00 and i want to count up to let´s say 0xff each step in a loop ?? i want to make a function and just pass the variable between the increasing steps (0x01,0x02,....0xdf, 0xef,0xff).
i was also interested in a solution writtten in C, as i it wouldnt be that easy like the above.
I don't understand this statement; that is C code. Of course, being C, it's also C++, "Arduino" code, etc.
C doesn't care if the constants are hex (0xff), octal (075), decimal (6789), or even ASCII ('c'). It doesn't know about binary constants, but somone wrote a macro to handle that, I think included in Arduino 7.
sorry, you are right! but i´ve another question which is hard to find through all references. how can i "eval" within arduino language. for example, i have some registers called reg_level0, reg_level1, reg_level2 ...
i want to set some bytes in a for-statement such as
for (i = 0; i < 5; i++) {
function_blablab(reg_level[i], 0x00);
}
of course above example couldnt be compiled as it interprets the square brackets as an array? do you know another syntaa for that?