In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail what is the program and the most basic structure and grammar of Arduino C language. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
What is a program?
A program is a series of instructions that direct a computer to do things.
The program is written in a computer programming language. Computer language is a tool for communication between people and machines. Without language, there would be no communication bridge between people and machines. There are many kinds of languages, and the more advanced the language is, the closer it is to people's language habits.
The improved C language is used in the programming of Arduino. C language is a commonly used language in computer programming circle, especially in control hardware, it is almost the only widely used high-level language.
C language is a high-level language, which consists of many English letters and symbols suitable for people to read. CPU only recognizes instructions made up of 0 and 1 (called "machine code"). Therefore, we have to translate the C language into 0 and 1 machine code before we can give it to CPU for execution. This translation process is called compilation.
Now let's learn an example from a system. Let's do this: "File-> example-> 0.1.basic-> Blink", download the program to Arduino, and observe the phenomenon.
What exactly does the code mean? The codes are regular and cannot be scribbled carelessly. As beginners, like learning Chinese, we should first learn the commonly used character codes and formats. You first study it yourself, try to modify the parameters, and then download it, observe the phenomenon, and see if there are any changes.
The following part is the most basic structure and grammar of ArduinoC language, which will be difficult for beginners to understand. Any language will be familiar and mastered as long as it is used frequently.
Annotation
Notes, just illustrative text, are convenient for others and themselves to read in the future, and will not be translated into instructions and data executed by the machine. Adding or removing comments has no effect on the instruction. Adding as many spaces as you want between parameters has no effect.
There are two forms of comments:
1. / *-
/ * this form can contain multiple lines of comments
Until the end of the combination of asterisk and slash
Often used at the beginning of a program-- * /
2 、 / /
/ / this form is used to write comments after this line slash.
The basic architecture of C language
The basic composition of C language is function, and C language is made up of a large number of functions. There are two forms of a function in a program, one is to define (write) a function (with curly braces), and the other is to call (use) a written function (without curly braces).
On what is the program and the most basic structure and grammar of Arduino C language is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.