Connect your circuit: USB power + cloudBit + IR transmitter + bright LED. We held our circuit together with a littleBits mounting board.Click here for the circuit diagram.
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.
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.
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.
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.
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.