O'Reilly logo

Arduino For Dummies, 2nd Edition by John Nussey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6

Basic Sketches: Inputs, Outputs, and Communication

IN THIS CHAPTER

check Fading like a pro

check Understanding inputs

check Varying resistances with potentiometers

check Showing off your stats with the serial monitor

In this chapter, I discuss some of the basic sketches needed 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 3) gives you the basis of an Arduino sketch. This chapter expands it by adding circuits to your Arduino. I walk you through building circuits using a breadboard, as mentioned in Chapter 4, and introduce a few new components from your kit.

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 circuits, each with their respective sketches. The content ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required