Introduction: Wireless Lighting
Turn on a lamp [or any other appliance that plugs into the wall] anytime from anywhere. Arriving home late to a dark apartment or just sitting on the couch and feeling lazy? Simply use your phone to remotely turn a lamp on or off.
How it works:
When you press the button in Cloud Control [on your phone or computer], a signal is sent to the cloudBit, which triggers the IR transmitter. The IR transmitter sends a blast of infrared light which is picked up by the infrared sensor on the AC switch. Upon receiving an IR signal, the AC switch toggles any device that is plugged into it on or off. The bright LED acts as a visual indicator that your circuit triggered.
Step 1: Set Up Your CloudBit If You Haven’t Done So Already.
Step 2: Connect Your Circuit
USB power + cloudBit + IR transmitter + bright LED. We held our circuit together with a littleBits mounting board.
Step 3: Set Up AC Switch
Plug the AC Switch into the wall. Then plug your lamp into the AC switch and turn it on. You will notice that the AC switch has a small oval-shaped sensor tethered to it. You will want to position this sensor so that there is a direct line of sight between it and the IR transmitter on your littleBits circuit.
Note: the IR transmitter emits light out from the side of the board. You will need to position the circuit so that the side of the IR transmitter is facing the AC switch. IR light is invisible to the human so you won't see anything happen on the board when you trigger the IR transmitter. You will however see the bright LED flash quickly if the cloudBit is triggered.
Step 4: Prepare the IR Transmitter
The IR transmitter has four channels and is able to work with up to four AC switches. However, for this project, unless you have more than one AC switch, you only need to use one channel on the IR transmitter. Set one of the little switches on the IR transmitter to the "on" position.
Step 5: Pair the IR Transmitter With the AC Switch
If you have a button module handy, temporarily replace the cloudBit in your circuit with it [if not, you can still use the cloudBit - the button just makes it easier to test quickly]. On the AC switch, you will see a slow blinking red light. If you don’t see this, hold down the button on the AC switch until you do. On your circuit, press the button module to pair with the IR transmitter. You should see the red light on the AC switch blink very quickly and then go off.
Step 6: Test the Circuit
Now, when you press the button module, your lamp should turn on and off. If it doesn't work, check all the connections of your plugs and/or try adjusting the positioning of the IR transmitter. To reset the AC switch, just hold the button down until the red light starts blinking slowly again.
Step 7: Make It Smart!
Once you know your circuit works, replace the button module with the cloudBit. Wait for the cloudBit to connect to wifi (the LED should be solid green), and then use the button on Cloud Control to remotely turn your lamp on and off.