O'Reilly logo

Arduino Sketches: Tools and Techniques for Programming Wizardry by James A. Langbridge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER11

LiquidCrystal

This chapter discusses the following functions of the LiquidCrystal library:

  • LiquidCrystal()
  • begin()
  • print()
  • write()
  • clear()
  • home()
  • setCursor()
  • cursor()
  • noCursor()
  • blink()
  • noBlink()
  • rightToLeft()
  • leftToRight()
  • scrollDisplayLeft()
  • scrollDisplayRight()
  • autoscroll()
  • 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 find 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 capacity to interact with the outside world but can be difficult 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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required