Chapter 7
Basic Sketches: Inputs, Outputs, and Communication
In This Chapter
Fading like a pro
Coming to grips with inputs
Varying resistances with potentiometers
Showing off your stats with the serial monitor
In this chapter, I discuss some of the basic sketches that you need to get you on your Arduino feet. This chapter covers a broad range of inputs and outputs using the sensors in your kit. If you don’t yet have a kit, I suggest reading through Chapter 2 to find one of the recommended ones.
The Blink sketch (described in Chapter 4) gives you the basis of an Arduino sketch, but in this chapter, you expand on it by adding circuits to your Arduino. This chapter walks you through building circuits using a breadboard, as mentioned in Chapter 5, and additional components from your kit to build a variety of circuits.
I detail uploading the appropriate code to your Arduino, walk you through each sketch line by line, and suggest tweaking the code yourself to gain a better understanding of it.
Uploading a Sketch
Throughout this chapter and much of the book, you learn about a variety of ...
Get Arduino For Dummies 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.