Description of project
Hacking a ghost lamp, control it with Arduino and Processing.
Step 1: Parts List
1.Ghost lamp
2.Standard wires
3.ProtoSnap
4.Mini USB adaptor
5.Relay
6.Breadboard
Tools list
1.screwdriver
2.wire cutter
3.solder
4.soldering gun
Step 2: Tools List
1.screwdriver
2.wire cutter
3.solder
4.soldering gun
Step 3: Theory
We find the pins that connected to the button and resolder them with wires that connected to relay, which can be controlled through Arduino and processing.
Step 4: Schematic
Step 5: Arduino And/or Processing Code
Attempt 1 ---Blink Code
Arduino-File-Examples-Basics-Blink
Get the code here
Because of the Loop function, the Led will blink over and over again.
But we cannot turn on or off through Arduino, so let’s try Dimmer.
Attempt 2 --- Dimmer Code
Arduino-File-Examples-Communication-Dimmer
Get the code here
We’ll copy the processing code embedded in Dimmer to processing and see what happen.Processing code attached below:
Processing code here
Now we can control the led by moving the mouse on the canvas processing created, when you move to black, the led will turn on, when you move mouse to white area, the Led will turn off.
Discussions
4 years ago on Introduction
Cool hack, it definitely has some fun implications!