2022-06-15 Arduino IDE beginners start

0. Learning video

Mainly watching the video of an old man on Youtube, which is lively, interesting and instructive;
address: https://www.youtube.com/playlist?list=PLGs0VKk2DiYw-L-RibttcvK-WBZm8WLEP

1. Install the Arduino IDE

Official website address: https://www.arduino.cc/en/software
insert image description here

2. Configure IDE

Insert the Arduino hardware device, select the board type, processor chip, port according to the configuration
insert image description here

3. Arduino code structure

Open the Arduino IDE, there are two functions by default: setup, loop

  • setup refers to the content executed when the board is started, and it is executed only once, generally writing pin configuration or parameter initialization;
  • loop is an infinite loop, and the content of this function will be executed after the setup is executed;
    insert image description here
    in addition, the arduino IDE also comes with many examples for learning
    insert image description here

4. Common functions

Click Help-Reference to open the official document, commonly used arduino internal functions and variables are available

insert image description here

5. Write code

After writing the code, click the second icon to compile the code and burn it into the board;
insert image description here

6. View the output value

Click the icon in the upper right corner to view the return value in the serial port, or send data to the serial port;
of course, the premise is that there are sending and receiving programs in the code;
insert image description here

おすすめ

転載: blog.csdn.net/Vissence/article/details/125289649