【笔记】Arduino控制双色LED灯模块
前言
Arduino UNO R4控制双色LED灯模块
接线图
flowchart LR
subgraph UNO ["Arduino UNO R4"]
Pin_11(("~11"))
Pin_10(("~10"))
Pin_GND(("GND"))
end
subgraph Module ["双色LED灯模块"]
A(("G(S)"))
B(("R"))
C(("GND(-)"))
end
Pin_11 --- B
Pin_10 --- A
Pin_GND --- C
源代码
analogWrite:输出值为0~255
1 | const int R_PIN = 11; |