It is not much complicated to program any Arduino boards, minimum awareness of basic usage of C-programing is required for getting started, Arduino provides built in libraries for developers or hobbyists.

The common instructions that are used for programing is as follows.


These are General Purpose Input and Output pins, we can used to interface input and output devices like switches, LEDs, relays, LCD (Liquid Crystal Displays) etc..


These are used to interface digital inputs and outputs which is logic HIGH and LOW operations.


Configures the specified pin to behave either as an input or an output. See the description of digital pins for details on the functionality of the pins.

As of Arduino 1.0.1, it is possible to enable the internal pull-up resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pull-ups.

Syntax: pinMode(pin, mode)


  1. Pin: The number of the pin whose mode you wish to set.
  2. Mode: INPUT, OUTPUT, or INPUT_PULLUP. (see the digital pins page for a more complete description of the functionality.)
  3. Returns : None


Reads the value from a specified digital pin, either HIGH or LOW.

Syntax: digitalRead(pin)


  1. Pin: The number of the digital pin you want to read (int)
  2. Returns : HIGH or LOW


Writes a HIGH or a LOW value to a digital pin. If the pin has been configured as an OUTPUT with pinMode(), it’s voltage will be set to the corresponding value: 5V (or 3.3V on 3.3V boards) for HIGH, 0V (ground) for LOW.

If the pin is configured as an INPUT, digitalWrite() will enable (HIGH) or disable (LOW) the internal pullup on the input pin. It is recommended to set the pinMode() to INPUT_PULLUP to enable the internal pull-up resistor. See the digital pins tutorial for more information.

Note: If you do not set the pinMode() to OUTPUT, and connect an LED to a pin, when calling digitalWrite(HIGH), the LED may appear dim. Without explicitly setting pinMode(), digitalWrite() will have enabled the internal pull-up resistor, which acts like a large current-limiting resistor.

Syntax : digitalWrite(pin, value)

Parameters :

  1. Pin: The pin number.
  2. Value: HIGH or LOW
  3. Returns: None

ANALOG I/O:            

These pins are the internal ADC (Analog to Digital Converter) pins, allows you to interface the microcontroller with the analog Input sensors and output analog devices and mostly used for PWM generation.

Leave a Reply