Category: Processing With An Arduino Lamp
-
Here’s How to Assemble It
Unpack the lamp and remove the cable that goes into the lamp from the bottom. You will no longer be plugging this into the wall. You can use a rubber band to strap the Arduino to the breadboard, and then hot-glue the breadboard onto the back of the lamp, as shown in Figure 6-1. Leave some room…
-
Assembling the Circuit
Figure 6-2 shows how to assemble the circuit. Just as you did in “Controlling Light with PWM” use a 220-ohm resistor (red-red-brown) with each LED, and just as you did in “Analogue Input”, use a 10 K ohm resistor with the photoresistor. Remember from “Controlling Light with PWM” that LEDs are polarized: in this circuit, the anode (long lead, positive) should go to…
-
Coding
There are two sketches that you’ll be running: the Processing sketch and the Arduino sketch. Example 6-1 is the code for the Processing sketch. You can also download it from the example code. Example 6-1. Arduino Networked Lamp There is one thing you need to do before the Processing sketch will run correctly: you need to confirm that the…
-
Planning
Let’s look at what we want to achieve and what bits and pieces we need. First of all, we need Arduino to be able to connect to the Internet. As the Arduino board has only a USB port, we can’t plug it directly into an Internet connection, so we need to figure out how to…
-
Introduction
We’re going to see how to put together a working application. How every single example can be used as a building block for a complex project. Here is where the wannabe designer in me comes out. We’re going to make the twenty-first-century version of a classic lamp by my favourite Italian designer, Joe Colombo. The object…