Notifications
Clear all

Theatre chase in opposite directions.

155 Posts
6 Users
2 Likes
10.7 K Views
Davy PS
(@davy-ps)
Member
Joined: 2 years ago
Posts: 74
Topic starter  

@robotbuilder 

Thanks Mate. Programme runs perfectly. Will spend next few days digesting learnings. 

 

Cheers,

 

Davy.


   
ReplyQuote
Lee G
(@lee-g)
Member
Joined: 3 years ago
Posts: 58
 

@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


   
Jonnyr reacted
ReplyQuote
Davy PS
(@davy-ps)
Member
Joined: 2 years ago
Posts: 74
Topic starter  

   
ReplyQuote
Davy PS
(@davy-ps)
Member
Joined: 2 years ago
Posts: 74
Topic starter  

@lee-g 

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.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@davy-ps 

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


   
ReplyQuote
Page 11 / 11