Examples > Esplora
This example is designed to be used with a Processing sketch. Processing is an open source programming environment. The application on the computer reads the sensors on the Esplora board and controls the buzzer and the RGB LED through a graphical interface. The image in the Processing application mirrors the Esplora board, so you'll see a virtual version of your board.
If you don't have Processing installed on your computer, you can also test this example opening the serial monitor and interacting with the Esplora trough serial commands.
There are two Processing sketches that work with this example, a simple one that prints the sensors in text, and a more complex one that shows a graphic representation of the Esplora. The former may be better for beginning Processing programmers, and the latter may be better for advanced Processing programmers.
Download the zip file containing the simple Processing sketch for this example.
Download the zip file containing the advanced Processing sketch for this example.
You only need to unzip this folder inside your Processing sketches folder, and open the .pde file in Processing.
Only your Arduino Espora is needed for this example.
This example opens a serial interface to the Esplora. You'll ask the board to read the sensors or write to the buzzer or RGB LED by sending commands over the Esplora's serial port.
The commands always starts with a character, which indicates the operation you want to perform followed by the value you want to write to the actuator or the number of samples you want to collect.
Using this sketch in combination with the application written in Processing, allows you to control the board with a graphical interface, instead of typing the commands through the serial port. It is still possible to control the board by manually entering commands in the serial monitor or serial application.
All sensor values will be displayed on the Esplora drawn on the computer screen, and you can command the buzzer and the RGB led with sliders, clicking on the component.
NOTE: Serial ports on a computer can only be accessed by one program at a time. If you have the Arduino IDE's Serial Monitor open, then the Processing Sketch will not be able to access the Esplora's serial port. Likewise, if the Processing sketch is still running, you won't be able to open the Serial Monitor or reprogram your Esplora.