Files
esp8266_study/code/TCRT5000/sketch_mar30a/sketch_mar30a.ino
2024-09-27 01:22:07 +08:00

19 lines
276 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#define LEFT 13
void setup()
{
Serial.begin(9600);
pinMode(LEFT, INPUT);
}
void loop()
{
// 1 没有检测到障碍物0 检测到障碍物
int Left_Value = digitalRead(LEFT);
Serial.print("LEFT: ");
Serial.println(Left_Value);
delay(2000);
}