Lesson 1, Topic 1
In Progress

6.1 Programming in Arduino IDE

09/09/2021

Programming with Arduino is very simple and easy.We will be using Arduino IDE software for programming the Arduino.The Arduino Integrated Development Environment – or Arduino Software (IDE) is an open source platform.It is supported in many OS like windows,Linux, macOS.

In Arduino IDE software,Arduino programming is written which allows you to code different boards.Arduino IDE is based on a very simple programming language called processing.

Arduino programming is written in C and C++ language with some additions of methods and functions.C/C++ language is a human-readable programming language. When you create a ‘sketch’ (the name given to Arduino code files) in Arduino Uno, it is processed and compiled to machine language( which is understandable by machines).Arduino programming is a very simple language to perform different task, doing cool stuff etc.

Basic structure of programming

The basic structure of writing program is very simple and this program have a minimum of 2 blocks:

  1. Preparation
  2. Execution

Each block has a set of statements enclosed in curly braces:

void setup( )

{

statements-1;

.

statement-n;

}

void loop ( )

{

statement-1;

.

statement-n;

}

Here, setup ( ) is the preparation block and loop ( ) is an execution block.Both the functions or blocks are necessary for writing the code.