由于我使用的是共阴极的RGB LED,如果你的是共阳极的,接线的时候要注意一下.
其他没什么不同
//定义RGB色彩的输出I/O int redPin = 11; int greenPin = 10; int bluePin = 9; //标记颜色变化的方式,增加值还是减小值 bool redBool =false; bool greenBool=true;
由于我使用的是共阴极的RGB LED,如果你的是共阳极的,接线的时候要注意一下.
其他没什么不同
//定义RGB色彩的输出I/O int redPin = 11; int greenPin = 10; int bluePin = 9; //标记颜色变化的方式,增加值还是减小值 bool redBool =false; bool greenBool=true;