Line Comment
There are two types of line comments, let us study them individually:
- Single-line comment: As the name suggests, the single lines that follow two forward slashes are known as single-line comments. These statements are known as comments because the compiler ignores all the characters that come after two forward slashes in a single line. Comments are hidden when the output is presented. Comments are added for the sole purpose of comprehension of the code and for writing necessary information for user reference.
// This is a comment
- Multi-line comment: The single line comment extends to one line and the Multi-line comment is used for adding comments in multiple lines. The syntax is a forward slash followed by an asterisk symbol (/*), ending with a */. It is mostly used for commenting larger text blocks that are not interpreted by the compiler and solely for reference purposes of users.
/ * This is a multiline comment*/
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