Hardware Reference
In-Depth Information
Two TinkerKit inputs
Two TinkerKit outputs
LCD screen header
So what is a TinkerKit input or output? TinkerKit is a fantastic way of
connecting components without needing to know anything about electron-
ics. There are different modules: joysticks, accelerometers, potentiometers,
Hall effect sensors, LEDs, servos, and relays to name a few. These modules
can be connected to a port using standard cables; the Arduino Esplora has
four ports.
As you can see, the Arduino Esplora has an amazing amount of components
on the device, but this comes at a cost. The Arduino Esplora is designed to be
held in your hand and has the look and feel of a console game pad. As such, it
does not have any shield connectors (but does have a header for an optional
LCD screen). It also does not have any prototyping space, meaning that adding
components is difi cult. There are no electronic input and output pins, and no
headers to add components to. All Arduino Esploras are therefore alike, and
therefore a library was written specii cally for this device.
The Arduino Esplora Library
The Esplora library is available in Arduino IDE 1.0.4 and later. To import the
library, use the Arduino IDE: Sketch
Import Library
Esplora, or add the
library manually:
#include <Esplora.h>
After this i le is imported, all the devices on the Arduino Esplora become
available through the Esplora constructor. There is no need to create this object;
it is dei ned automatically.
RGB LED
The Arduino Esplora has a high-power RGB LED on-board. A sketch can control
this LED and create different colors by varying the output to each component.
This is done automatically via PWM, and writing a value to the LED once keeps
the LED on at the specii ed color until instructed otherwise.
To set the LED to a specii c color, use writeRGB() .
Esplora.writeRGB(red, green, blue);
 
Search WWH ::




Custom Search