第 2 節
Arduino library (for reference only)
0瀏覽次數0訪問次數--跳出率--平均停留
Arduino libraries (Qualcomm Arduino, ESP32)
The Qualcomm Arduino language system was designed with reference to C, C++, and Java, resulting in a comprehensive yet concise language. Its syntax is more similar to C++, but it does not support C++ exception handling and lacks the STL library. You can think of it as a streamlined version of C++.
Reference: Arduino Common Library Functions and Quick Study Guide
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 pin initialization function pinMode()

I/O output functions

I/O input function

Simplest motor driver board usage explanation
Introduction to the L298N Motor Driver Board






How do you power the microcontroller and the L298N motor driver board?



