树莓派-U型光电传感器实验
# 接线图 # 树莓派管脚图 # 代码 # C #include <wiringPi.h>#include <stdio.h>#define LBPin 0 // light break pin set to GPIO0#define Gpin 1#define Rpin 2void LED(int color){ pinMode(Gpin, OUTPUT); pinMode(Rpin, OUTPUT); if (color == 0){ digitalWrite(Rpin,...
more...