Brackets
There are two types of brackets utilized in Arduino coding, as given below:
- Parentheses: When writing a function in IDE, the parentheses brackets are used to include the argument parameters, such as methods, functions, or code statements. In addition to this, the bracket is also used for defining the precedence order while dealing with mathematical equations. These brackets are represented by ‘( )’.
- Curly Brackets: Curly brackets are used to open and close all the statements in the functions or out of the functions. Note that a closed curly bracket always follows the open curly bracket in the code for proper layout. These brackets are denoted by ‘{ }’.
- Open curly bracket- ‘ { ‘
- Closed curly bracket – ‘ } ‘
Arduino Coding Basics
In some previous articles, we have seen and understood the concepts of Arduino Boards, Arduino IDEs, and the installation procedure for Arduino software. Arduino IDE (Integrated Development Environment) is an essential which makes the task of uploading code on Arduino boards, an easy task. Instead of writing them at the assembly level, the IDEs make it convenient and the codes are written in high-level languages like C and C++. Let us get introduced to the basics of Arduino Coding.
Make sure that you have an appropriate IDE for coding before starting your journey to Arduino coding. Let us study every character, command, and function that is used in Arduino. Keep your Arduino IDE switched on so that you can apply the concepts you learn from the article.
Table of Content
- What is Arduino?
- Electronic Signals
- Brackets
- Line Comment
- Coding Screen
- Time
- pinMode ( )
- digitalWrite( )
- delay ( )
- Solved Example
- Advantages and Disadvantages of Arduino
- Application of Arduino