Limetime's TimeLine
반응형
article thumbnail
[Arduino] 삼원색 LED로 자연색 만들기
C&C++/Arduino 2023. 1. 3. 23:42

삼원색 LED는 내부에 RGB 각각의 발광다이오드들이 모두 들어 있다. 그러므로 빛의 삼원색을 혼합하여 자연색을 구현할 수 있다. 제일 긴 다리가 GND이다. 1. 3개의 색. 혼합 점멸 int LED_R = 11; int LED_G = 10; int LED_B = 9; void setup() { // put your setup code here, to run once: pinMode(LED_R, OUTPUT); pinMode(LED_G, OUTPUT); pinMode(LED_B, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(LED_R, HIGH); delay(500); digitalWrite(LE..

반응형