Thanks Mate. Programme runs perfectly. Will spend next few days digesting learnings.
Cheers,
Davy.
@robotBuilder, @Will, @DavyPS
Thanks, gentlemen. I have been following along with this topic from the beginning. I even purchased a reel of neopixels to play with. Thanks very much to @robotBuilder and @Will for their help and instructions in how to efficiently program this project. Very interesting… “wasted” many afternoons working on this. But, at 76, my days are not exactly filled with pressing matters. Now trying to port it to RPi using Python. Will be trying to use two strips running independently lighting up the lights. (Hopefully… I don’t have it working yet).
Good Wishes to you and yours,
Lee
Hi Lee. I started my electronics career around three months ago. Trying like mad to get me head around programming. robotBuilder and Will have been a great support and freely giving of their time and knowledge. Once I get to a level where I feel comfortable I am going to try and set up an ATMEGA chip to run independently of USB on breadboard powered by 2X9V batteries in parallel down through a 7805 IC to give me 5V.
Cheers,
Davy.
How is this function actually applied in the context of this code. IE What does it do?
// == this is a function to swap values between two integer variables =====
void swapInt(int &a, int &b) {
int c = a;
a = b;
b = c;
}
It swaps the values of color1 and color2.
// values before executing swapInt()
color1 == BLUE
color2 == YELLOW
swapInt(color1,color2)
// values after executing swapInt()
color1 == YELLOW
color2 == BLUE