It is a lamp called dreamlight. In the shake mode, it can blink after I shake it. If I switch it into sensor mode, it can blink when it sense the darkness. It also has a solar panel but unfortunately it has never worked. Now I'm trying to hack into the dreamlight and use computer to control it.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Take It Apart
I unscrew all the cover for the electronic parts and try to figure out how does it make the light blink. It has a lot of different functions so it appears very complicate, but my aim is only to control the light, so I'm trying to find the right pins to short the switch that can make the light blink.
Step 2: Connect the Light Into Protosnap
Based on guessing and testing by wire I find the right pins to short the switch that can make the light blink. Then I I solder one side of the two wires to the switch and the other side to the relay. Soldering the other two wires to the Protosnap. The point of the relay is that because we don't want to overpower the circuit but we want the wires to link together. The relay can do this by magnetic field created by electronic current.
Step 3: Use Arduino to Control the Light
I use the dimmer example in the Arduino. The default ledpin is 9. Because I connect my light to A0, so I change "ledpin=9" to "ledpin=A0". Then press upload. Then The light is blink now! After that, I copy the processing code to Processing, so that I can control the light by processing.