Creating Your Own Dashboard
Instead of printing our digital and analog sensor data to a serial port, we’ll simulate a small part of a modern car’s dashboard in this section. Most cars today show the current temperature, and many also have a parking-distance control system that warns you if you get too close to another object.
In my car, the parking-distance control consists of a couple of orange and red LEDs. If nothing’s near the car, all LEDs are off. As soon as the distance between the car and a potential obstacle gets too small, the first orange LED lights up. The shorter the distance, the more LEDs that light up. If the distance reaches a critical limit, all LEDs are on, and the car plays an annoying beep tone.
Here’s the application we’re ...
Get Arduino: A Quick-Start Guide, 2nd Edition 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.