Arduino Coding Basics
How do the digitalRead() and digitalWrite() function differently from each other?
The digitalRead() function is used to take the HIGH/LOW value from a digital pin, while the digitalWrite() function is used to alot the HIGH/LOW value to a digital pin.
What function can be used if you wish to turn on or turn off the LED?
The delay() function is used to add the delay in milliseconds. The delay defines the time when a pin will be high or low.
What are the two sections that appear when you open an Arduino IDE?
The two sections of the blocks are the setup() and loop() blocks used for initializing the commands and libraries.
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