Wiki
Arduino library (just get familiar with it)
About 4 min read
Existing English translations were reused. 2 current source blocks remain in Simplified Chinese, without triggering paid translation.
1.Arduino libraries (Qualcomm Arduino, esp32)
The Qualcomm Arduino language system was designed with reference to C, C++, and Java. It is a comprehensive and concise language, with syntax more similar to C++, but it does not support C++ exception handling and has no STL library. You can regard it as a streamlined C++.
Reference:Commonly Used Arduino Library Functions and Quick Learning Reference
int led0 = 13;
// 初始化函数
void setup() //运行一遍
{
//将LED灯引脚(引脚值为13,被封装为了LED_BUTLIN)设置为输出模式
pinMode(led0, OUTPUT);
//OUTPUT输出信号,输出让led灯亮的信号 给引脚写数据
}
// 循环执行函数
void loop() //while(true)
{
digitalWrite(led0, HIGH); // 打开LED灯 HIGH高电平
delay(1000); // 休眠1000毫秒ms
digitalWrite(led0, LOW); // 关闭LED灯
delay(1000); // 休眠1000毫秒ms
}
int main()
{
while(true)
{
}
}
int main()
{
setup();
while(true)
{
loop();
}
}



I/O Port initialization function pinMode()

I/O输出函数

I/O输入函数

2.Explanation of the simplest motor driver board usage
Introduction to the L298N Motor Driver Board






How to supply power tothe microcontrollerand the motor driver board L298N?



