Hardware Reference
In-Depth Information
CROSS REFERENCE digitalWrite() and analogWrite() are standard
functions, which are explained in Chapter 4.
LCD Module
The Arduino Esplora can also host an optional TFT screen placed on the con-
nectors on the middle of the board. This module uses the standard TFT library
(as well as SPI), and there are no Esplora-specii c functions for this module.
However, as everything on the board is hardwired, you don't need as much code
to use a screen as other Arduinos. After including the TFT, SPI, and Esplora
libraries, all you need to do is reference the Esplora TFT object with EsploraTFT .
For more information on the TFT library, see Chapter 13.
There is also another use for the LCD Module connectors. Contrary to most
Arduinos, the Esplora does not support shields; apart from the TFT connector,
there are no connectors capable of placing a board or shield, and there are no
prototyping areas. By using this connector, it is possible to have more inputs
and outputs. The connectors on the left side of the Esplora are not electronically
connected; they are there solely to i x the TFT screen in place. On the right side,
however, several pins are exposed. Of course, this is to allow the TFT screen to
talk using the SPI protocol, but there are a few others, for example, to control the
backlight. Creating a PCB for use with the Esplora is beyond the scope of this
book, but you can i nd more information on the connector on Arduino's website.
Example Program and Exercises
The Arduino Esplora is an excellent device to get “hands-on,” and the next
chapter presents another unique device. The Esplora, in the shape of a handheld
game controller, can also be used as a remote control. Without spoiling the next
chapter too much, this project converts the Esplora into a remote control for the
Arduino Robot, an interesting device that is essentially a moving Arduino. It is
controlled by two motors, and can move forward, backwards, and turn around.
This sketch will serve as a remote control for the Arduino Robot, by using the
two TinkerKit outputs. The left TinkerKit connector controls movement to the
left, and the right TinkerKit controls movement to the right. If both are activated,
the device goes forward, and if neither is active, then the device stops.
NOTE If you do not have access to an Arduino Robot, this project can be adapted to
other robotic kits. Several interesting devices are available at http://www.robot-
shop. com/ . Th is can be adapted to both vehicles and robotic arms.
 
Search WWH ::




Custom Search