This lamp I made is called the Rainbow Mood Lighting Lamp. The lamp is able to be turned off and on with a switch, and changes color from the input of the potentiometer.
For the switch, I connected pin A1 via the yellow alligator clip to the switch. Then I connected the black alligator clip to ground on my board.
After testing that with just one color to make sure everything works, I moved onto the potentiometer. I connected pin A2 via the white alligator clip, Ground via another black alligator clip, and the Red alligator clip to V3.3 pin on my board.
The lamp is an IKEA lamp that I've had for a while but haven't used. I took out the light bulb and fastened my board in place with double sided tape. For assembling my box to both raise the lamp off the table and house the wiring, I took an old basket and pulled the clips through the wicker. Then, I fastened the switch to one side of the basket, and the potentiometer to the other side. I used more double sided tape to secure them into place.
I borrowed the Code from Stephen Barrett on Hackster.io for his Swedish mood lamp.
Comments