Hardware Reference
In-Depth Information
one_time = false;
digitalWrite(FAN, LOW);
lcd.setCursor(15,1);
lcd.write(1);
}
}
You no longer need to have the Arduino and components tethered to the
computer to see what the temperature is. If you like, you can plug in a battery
or wall power supply and place it anywhere in your room.
NOTE Towatchademovideoofthispersonalthermostatinaction,checkout
www.exploringarduino.com/content/ch10 .Youcanalsofindthisvideoon
theWileywebsiteshownatthebeginningofthischapter.
TakingThisProjecttotheNextLevel
You could expand the functionality of this program in all kinds of ways. Here
are a few suggestions for further improvements you can make:
Add a transistor to the fan so that it can draw more current and move
more air.
Use pulse-width modulation (PWM) to control fan speed so that it changes
according to how far over the set temperature you are.
Add LED indicators that display visual alerts.
Make the speaker alert into a melody instead of a tone.
Add a light sensor and automatically adjust the backlight brightness of
the display using an SPI potentiometer from Chapter 9, “The SPI Bus,”
based on the brightness of the room.
Summary
In this chapter you learned about the following:
Parallel LCDs can be interfaced with the Arduino through a standard
wiring scheme.
You can create custom characters for your LCD by generating arbitrary
bitmaps.
You can modify your debounce function from Chapter 2 to debounce
multiple buttons.
You combine multiple sensors, motors, buttons, and displays into one
coherent project.
 
Search WWH ::




Custom Search