In this chapter you will
Create your own functions
Learn to make decisions with
Send and receive data between your Arduino and the Serial Monitor window
You’ll learn new methods to make your Arduino sketches easier to read and simpler to design by creating your own functions. You can also create modular, reusable code that will save you time again and again. We’ll introduce a way to make decisions that control blocks of code, and you’ll learn about a type of integer variable called the
long. Then you will use your own functions to create a new type of thermometer.
A function consists of a set of instructions that we can use anywhere in our sketches. Although many functions ...