DevJav / best_friend_lamp_arduino

Best friend lamp project made with Arduino
15 stars 5 forks source link

More than 2 lamps? #14

Open ctmorrison opened 2 months ago

ctmorrison commented 2 months ago

If I want to have more lamps, do I simply number them sequentially higher? For my needs, I want 3 lamps. I'm assuming I merely recompile the code each time with numbers: 1, 2 and then 3. Correct?

DevJav commented 2 months ago

Sadly it won't be that easy. The whole logic is prepared for just 2 lamps. It can be done but you'll need to make changes into the code.

ctmorrison commented 2 months ago

OK. Then, I'll review the code and see if I can figure that out. Thanks for the quick response!

hippsabq commented 2 months ago

I never got a chance to polish and document my code, but I was able to do something similar with a fork I created:

https://github.com/hippsabq/best_friend_lamp_arduino

Didn't have to alter much. Been working for a year now. Every lamp received the message from the sending lamp and every lamp has the capability to respond or pulse to extend. Mostly by changing the way if looks for any message other than it's own which it can tell by lamp ID

can't guarantee that it will work out of the box since I haven't looked at the code in a while, but might give you some code ideas for your intended use.

ctmorrison commented 2 months ago

Thank you! Upon a quick look at the code, I felt it would be fairly easy to make it capable of handling 3 lamps (or more). In any case, I'll look at your fork to see what you did! Thank you!