Wednesday, October 6, 2021

Arduino Series - Part 02

Programming of Arduino



In this chapter, we will study in depth, the Arduino program structure and we will learn more new terminologies used in the Arduino world. The Arduino software is open-source. The source code for the Java environment is released under the GPL and the C/C++ microcontroller libraries are under the LGPL.
Sketch − The first new terminology is the Arduino program called “sketch”.
Structure: 
Arduino programs can be divided in three main parts:










1. define: 



Since there are 14 Digital Pins and 6 Analog Pins in Arduino UNO, we have to define that which are the pins among them that we are going to use in the project.


2. void setup()

Whatever we write in void setup() that part runs just for a once in Arduino. Hence, here we have to define the pins as our INPUT or OUTPUT.


3. void loop()

void loop() is the most important part of programming. Whatever we write in void loop gets repeated again and again. Hence whatever we want to do with Arduino that thing should be written in void loop().



No comments:

Post a Comment

Featured Post

Innovative Project on My City My Learning Tool