tcrt5000循迹模块micropython
时间: 2023-12-23 14:04:26 浏览: 119
寻迹模块TCRT5000
5星 · 资源好评率100%
```python
# 循迹传感器部分代码
from machine import Pin, ADC
# 定义引脚
pin_DO = Pin(0, Pin.IN)
# 读取传感器数值
def read_sensor_value():
return pin_DO.value()
# 示例
sensor_value = read_sensor_value()
print("Sensor value:", sensor_value)
```
阅读全文