Hardware Reference
In-Depth Information
Exercises
You have seen that with this library, you can use new hardware with only a
few lines of code. The Si1145 is a powerful device, capable of replacing a light-
dependent resistor (LDR) in most applications, with the advantage of including
a proximity sensor. Of course, having a device that can give the exact UV level
is a huge advantage for wearable devices that can be used for skin protection,
both for adults and children. You can monitor when you have had enough sun,
or when it is unsafe for children to play outside. Try to add this device onto one
of the projects that you have created while reading this topic. A UV sensor is
always a great addition to weather stations and nice to have for outdoor sensors.
Summ ary
In this chapter, you have seen what a third-party library is, where you can i nd
one, and how to run example programs, all of which is designed to get you up
and running. You have seen how to get information about the different func-
tions the library has—what they do and the values they return. You have seen
how to import them into the Arduino IDE and how to use them in your own
applications. Libraries are typically used to add functionality from shields, and
in the next chapter you will see how to design and create your own shield for
use in your projects.
 
Search WWH ::




Custom Search