rusus
1
Hi
Hw can i Call diffrent Consts based on a nother Variable
For example
#define pin3 3
#define pin2 2
#define pin1 1
foo = 3
digitalWrite(pin"foo", HIGH);
the "foo" should then be replaced with a 3. I know a switch but its too long for my application. i have ~30 pins.so it would be too long
Thanks
J-M-L
2
No you can’t c++ is compiled and all names go away, you can’t find them at run time
Use an array
rusus
3
Actually it for its for calling another array for another array index
but yeah thx anyways
rusus:
Actually it for its for calling another array for another array index
but yeah thx anyways
You mean a two-dimensional array? We have those!
I believe this current Thread from another Forum member deals with the exact same question
...R