Hardware Reference
In-Depth Information
noAutoscroll()
createChar()
The hardware needed to use the examples in this chapter includes:
Arduino Mega 2560
SainSmart LCD Shield
HC-SR04 ultrasonic distance sensor
You can i nd the code download for this chapter at http://www.wiley.com/
go/arduinosketches on the Download Code tab. The code is in the Chapter 11
download folder and is named Chapter 11.ino .
Introduction
For computers to be effective, they require two things: a way to input data and a
way to output data. Data output can be in several forms; sometimes, it is invisible,
communicating with other devices, such as safety systems in transportation.
They are busy keeping you safe, but you will never see them. Other forms are
slightly more visible: devices designed to turn on other devices, such as a timer
designed to turn on a coffee machine at a particular time. They have the capac-
ity to interact with the outside world but can be difi cult to see.
Of all the human senses, sight is probably the most powerful. The best way
for a computer to communicate data to the user is visually. Lights are often used
for small quantities of data; a small light on your television set can tell you if it
is receiving information from a remote control, and the amount of devices that
tell you if they are powered with a simple red light is staggering. When more
data needs to be displayed, other methods need to be used.
One of the most frequently used methods of displaying data is the liquid
crystal display. Liquid crystal displays (or LCDs for short) can be found in digital
watches, calculators, agendas, and vending machines, and the same technology
is used for computer screens. They get their name from the thin i lm of liquid
crystal contained inside the screen, wedged between two conductive plates.
When in their natural state, the crystals inside the liquid are twisted, and light
can pass through. When the crystals are subjected to an electrical current, they
untwist, blocking the light. This makes the portion of the screen black.
LCD technology is fast and reliable, and uses little energy. Solar powered
calculators allowed the user to make calculations with a minimal amount of
light, and the solar panel was more than sufi cient to power the processor and
the LCD screen.
The earliest LCD screens were used to display numbers, typically for pocket
calculators or wristwatches. To simplify the design, a format was created, one
that allows the display of all numbers from 0 to 9. When decimal points were
 
Search WWH ::




Custom Search