Summary

Finally getting to some of the fun stuff, this chapter introduced the input and output pins available on the Arduino interface board and the various functions to work with digital I/O. You’ve got a feel for how to set up a pin depending on how we intend to use it, the couple of ways that an input pin can be read, and some different methods to write to an output pin. Digital I/O is the bread and butter of embedded electronics and we will continue to return to it throughout the rest of this book.

For now though, we are going to move on to analog I/O. Whereas digital I/O is black and white, on or off, analog I/O opens up a world of grays, giving us an entire range of values between on and off. How far away is another person or a wall, how bright is it in the room, what’s the relative humidity right now, how much does something weigh or how much force does it exert—these are all some of the questions that can be answered using the appropriate analog sensors. As a way to discuss the various analog functions at our disposal, our next project will explore how to make a fan spin based on someone’s breath from a sensor’s input. So let’s keep going.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.121.131