Difference between revisions of "Arduino Program Structure"

From WikiOD
Line 3: Line 3:
 
'''Sketch''' -The first new term is the Arduino program named " '''sketch''' ".
 
'''Sketch''' -The first new term is the Arduino program named " '''sketch''' ".
  
=====Structure=====
+
===Structure===
 
The Arduino program can be divided into three main parts: '''structure, values''' (variables and constants) and '''functions''' . In this tutorial, we will gradually understand the Arduino software program and how to write the program without any syntax or compilation errors.
 
The Arduino program can be divided into three main parts: '''structure, values''' (variables and constants) and '''functions''' . In this tutorial, we will gradually understand the Arduino software program and how to write the program without any syntax or compilation errors.
  

Revision as of 10:09, 26 August 2021

In this chapter, we will delve into the Arduino program structure and learn more new terms used in the Arduino world. The Arduino software is open source. The source code of the Java environment is released under the GPL, and the C/C++ microcontroller library is under the LGPL.

Sketch -The first new term is the Arduino program named " sketch ".

Structure

The Arduino program can be divided into three main parts: structure, values (variables and constants) and functions . In this tutorial, we will gradually understand the Arduino software program and how to write the program without any syntax or compilation errors.

Let's start with the structure . The software structure includes two main functions:

  • Setup() function
  • Loop() function
Image.14.png
Void setup ( ) {

}
  • PURPOSE -The setup() functions called when the sketch is started. Use it to initialize variables, pin patterns, enable libraries, etc. The setup function can only be run once after each power-on or reset of the Arduino board.
  • The INPUT - -
  • The OUTPUT - -
  • The RETURN - -
Void Loop ( ) {

}
  • PURPOSE -After creating the setup() function to initialize and set the initial value, the loop() function, as its name implies, allows your program to continuously loop changes and responses. You canoes it to actively control the Arduino board.
  • The INPUT - -
  • The OUTPUT - -
  • The RETURN - -