The Arduino Esplora is a device that has a tiny computer called a microcontroller, and a number of inputs and outputs. For inputs, there's a joystick, four buttons, a light sensor, a slider, a microphone, a temperature sensor, and an accelerometer. For outputs there's a buzzer and a three color LED. At first glance it looks like a videogame controller.
With the Esplora, you can write software that takes information from the inputs and use that to control the outputs on the board, or control your computer, just like a mouse or keyboard would.
The Esplora is different from all previous Arduino boards, in that it has inputs and outputs already connected to the board. This means that you don't need to know how to connect electronic sensors or actuators to use it as a result. As a result, programming for it is a bit different than for other Arduino boards. It has its own library that makes it easier to read from the input sensors and write to the output actuators. You'll see how to use the library in this guide and in the Esplora library reference pages as well.
This guide will take you through the process of connecting the Esplora board to your computer and uploading an Arduino program, called a sketch.
On this page... (hide)
You also need a proper Micro-USB cable ("A" plug to "Micro-B" plug type). Some mobile phones or portable music players use this kind of cable to transfer data to/from the PC, so you might already own one of them. This is different from a USB-Mini cable in that it's a slimmer connector. You can see the differences here (the connector you need is the one on the left in this photo.
Get the latest version of the Arduino IDE from the download page. You'll need version 1.0.3 or later of the Arduino IDE.
When the download finishes, unzip the downloaded file in any directory. Make sure to preserve the folder structure. Double-click the folder to open it. There should be a few files and sub-folders inside. If you're on a Mac, the zip folder contains just the application.
Connect the Arduino board to your computer using the USB cable. The green power LED (labelled ON) should go on, and the yellow LED marked "L" should start glowing. After about 8 seconds, the yellow LED should start blinking on and off.
The following instructions are for Windows 7. They are valid also for Windows XP, with small differences in the dialog windows.
There is no need to install drivers for Ubuntu 12.04.
Double-click the Arduino application. (Note: if the Arduino software loads in the wrong language, you can change it in the preferences dialog. See the environment page for details.)
Open the LED Blink example sketch: File > Examples > Esplora > Beginners > EsploraBlink.
Note: If you do not see the EsploraBlink example, you may need to update the Esplora library. To do this, quit the Arduino IDE and download this .zip file. When you unzip it, you'll have a folder called Esplora. Look in your Documents folder (on OSX or Ubuntu) or My Documents folder (on Windows) for the Arduino sketches folder. It will be called "Arduino" and there should be a folder inside called "libraries". If not, create a libraries folder inside the sketches folder. Move the Esplora folder into the libraries folder. Then re-start the Arduino IDE. Now you should be able to open the EsploraBlink sketch as described above.
Since the Arduino IDE is used for many different Arduino boards, you need to tell it that you're working with the Esplora. Open the Tools > Board menu and choose Arduino Esplora.
The Arduino IDE needs to know which of your USB ports the Esplora is connected to. The Tools > Serial menu lists the available ports:
Now, simply click the "Upload" button in the environment. Wait a few seconds - you should see the RX and TX leds on the board flashing. If the upload is successful, the message "Done uploading." will appear in the status bar of the software.
A few seconds after the upload finishes, you should see the yellow RGB LED on the board start to blink, changing color from red to green to blue to yellow to cyan to magenta to white. If it does, congratulations! You've gotten Esplora up and running.
Now that you've verified that the Esplora can connect to your computer and you can upload code, it's time to try a few of its functions. The Esplora has input sensors, which you get information from using read commands, and output actuators, which you control using write commands. The RGB LED and the buzzer are the two main output actuators. The joystick, linear potentiometer slider, microphone, accelerometer, temperature sensor, and pushbuttons are the input sensors. You can also add your own inputs and outputs using the TinkerKit input and output connectors.
In this example, you'll get the RGB LED to blink each of its colors once, then all three at the same time. The Esplora library, included at the beginning of the sketch, has a number of methods that will simplify the code you need to use.
The sketch below is similar to the EsploraBlink example, but controls the LED in a slightly different way. You can either use the Esplora.writeRGB() command, and give it red, green, and blue values like so:
Or you can turn on each individual color using the Esplora.writeRed(), Esplora.writeGreen(), and Esplora.writeBlue() commands, as you see below.
Copy the code below, and paste it into the Arduino IDE. Make sure you have the right serial port and the Esplora board selected, as you did previously. Plug your board in and upload the code. Once it is uploaded, you should see the RGB LED flashing.
The Esplora has a number of sensors right on its surface. In this example, you'll use the linear potentiometer (the slider at the bottom of the board) to change the brightness of the RGB LED.
Inputs on the Esplora give you values between 0 and 1023, except the pushbuttons, which give you 0 or 1. Outputs don't have the same range, however. The LED output ranges from 0 to 255. To get the value from the input to scale to the value for the output, you'll divide the input by 4. This new number will be the brightness level of the LED.
Copy the code below, and upload it as you did the previous examples. Once uploaded, move the slider back and forth. You should see the Red LED change its brightness.
There are a number of example sketches in the File -> Examples -> Esplora that show you more of what you can do with your Esplora. They're divided into examples for programming Beginners or Experts. If you're just getting started in programming, or you want to see how to use one input or output at a time, start with the Beginners examples. If you're an experienced programmer, then the Advanced examples will give you some more ideas.
If you've never programmed before at all, there are more examples included with the IDE to show you some of the basic programming structures. Note that these examples will need to be modified a bit to work with the Esplora, however. You'll need to include the Esplora library by choosing Import Library... -> Esplora from the Tools menu, and you'll need to change the general Arduino inputs and outputs for the Esplora inputs and outputs. For more on this, see the Guide to using Esplora with the Arduino Examples
If you have problems, please see the troubleshooting suggestions.
The text of the Arduino getting started guide is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the guide are released into the public domain.