Part 1. I used a photocell which tracks down the light level. The lamp responds to this photocell as changing the color of the lamp. I used the analog input code, and then modified to make the light look like jump from one ball to the other.
It is not an inventory switch. I just tried to make 2 balls behave like as one button. When the pins on the balls touch each other, the current is actually connected to the board. I tried to make this lamp as a morse code lamp though , but couldn’t get there. I guess for some of you it is a small step but for me it is a big one 🙂