C H A P T E R  4

Image

Simple Sounders and Sensors

This chapter is going to get noisy. You're going to attach a piezo sounder to your Arduino in order to add alarms, warning beeps, alert notifications, etc. to the device you are creating. As of version 0018 of the Arduino IDE, tones can be added easily thanks to a new command. You will also find out how to use the piezo as a sensor and learn how to read voltages from it. Finally, you'll learn about light sensors.

Let's start with a simple car alarm and the tone() command to make sounds from your Arduino.

Get Beginning Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.