arduino array[]
Is it possible to make array values like this:
int array[3] {
1, 2, 3&4
};
so the third value would be both 3 and 4 at the same time, using this I could make two leds light up at the same time easier.
9 Replies
You can derive many numbers from one value using math of some sort.
For example:
hmm
wut
This turns on LEDs attached to pin 3 and 4.
oh okay thank you
Just for fun, here is another way you could do something like this: https://wokwi.com/projects/439078942615205889
I try to avoid libraries as a beginnre
Not really a library exactly, just a header file and a .cpp file that I wrote to keep the .ino file less cluttered.
okey
You can drive an aray of pointers then do anything you can dream up with them.
Say you make a class of number sets. Then derive an array of pointers to this kind of class. Each array slot could have a competely different set.