In this section we will quickly look at the commonly used in-built function in the Arduino C sketches. These functions will help us in performing basic tasks while interfacing with various devices. Unless you are attempting advanced sketches, the following functions will be very helpful in building most of the Arduino sketches. Apart from the below in-built functions, device specific header files and functions are also used - we will understand this aspect in the chapter for Day 2 while understanding how to use a header library for a sensor.
C Sketch function | Purpose |
pinMode(PIN-NUMBER, I/O-MODE) | This function is used to specify whether a particular Arduino pin will be used in Input or Output mode. |
digitalRead(PIN-NUMBER) | This function is used to read digital input from a digital pin. The input value is either LOW or HIGH and... |