first commit

This commit is contained in:
编码猿
2024-09-27 01:22:07 +08:00
commit 1360daaab0
931 changed files with 131068 additions and 0 deletions

View File

@@ -0,0 +1 @@
3429dc01-405f-49e4-9f33-4daae2dd83a0

View File

@@ -0,0 +1 @@
d9c07498-b7dc-45c0-918c-c204eb375deb

View File

@@ -0,0 +1,34 @@
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the serial monitor
读取引脚2的数字输入将结果显示在串口监视器中
This example code is in the public domain.
*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
//引脚2连接有按键开关给它一个名字
int pushButton = 2;
// the setup routine runs once when you press reset:
//当你按下复位按钮后setup流程运行一次
void setup() {
// initialize serial communication at 9600 bits per second:
//串口通讯初始化每秒9600位
Serial.begin(9600);
// make the pushbutton's pin an input:
//设置按键引脚为输入
pinMode(pushButton, INPUT);
}
// the loop routine runs over and over again forever:
// loop 流程会永远的反复运行
void loop() {
// read the input pin:
//读取输入引脚:
int buttonState = digitalRead(pushButton);
// print out the state of the button:
// 显示按键状态
Serial.println(buttonState);
delay(1); // delay in between reads for stability 为确保程序稳定运行进行短暂停止
}