-
TIP122 트렌지스터 - RGB LED - ARDUINO / ESP32하드웨어 2023. 1. 29. 16:57
#TIP122 - RGB LED - 아두이노
#TIP122 - RGB LED - ESP32
#관련글
#판매몰
#관련 부품 판매몰
#TIP122 - RGB LED - 아두이노
#결선도
#코드
const int G = 9; const int R = 10; const int B = 11; void setup(){ } void loop(){ analogWrite(R, 30); delay(1000); analogWrite(R, 255); delay(1000); analogWrite(R, 0); analogWrite(G, 30); delay(1000); analogWrite(G, 255); delay(1000); analogWrite(G, 0); analogWrite(B, 30); delay(1000); analogWrite(B, 255); delay(1000); analogWrite(R, 255); analogWrite(G, 255); delay(1000); analogWrite(R, 0); analogWrite(G, 0); analogWrite(B, 0); }
#영상
#TIP122 - RGB LED - ESP32
#결선도
#코드
const int R = 27; const int G = 14; const int B = 12; const int freq = 25000; const int Channel0 = 0; const int Channel1 = 1; const int Channel2 = 2; const int resolution = 8; void setup() { ledcSetup(Channel0,freq,resolution); ledcSetup(Channel1,freq,resolution); ledcSetup(Channel2,freq,resolution); ledcAttachPin(R , Channel0); ledcAttachPin(G , Channel1); ledcAttachPin(B , Channel2); } void loop() { ledcWrite(Channel0, 10); delay(1000); ledcWrite(Channel0, 255); delay(1000); ledcWrite(Channel0, 0); ledcWrite(Channel1, 10); delay(1000); ledcWrite(Channel1, 255); delay(1000); ledcWrite(Channel1, 0); ledcWrite(Channel2, 10); delay(1000); ledcWrite(Channel2, 255); delay(1000); ledcWrite(Channel0, 255); ledcWrite(Channel1, 255); delay(1000); ledcWrite(Channel0, 0); ledcWrite(Channel1, 0); ledcWrite(Channel2, 0); }
#영상
#관련글
#판매몰
#판매몰
#관련 부품 판매몰
'하드웨어' 카테고리의 다른 글
쿨링팬의 풍량 풍압 정압 PQ커브 (0) 2023.06.17 볼 베어링 Ball Bearing (고온 쿨링팬 BLDC팬) (0) 2023.04.27 TIP122 트렌지스터 - LED - 아두이노/ESP32 (0) 2023.01.29 삼방티 배관 연결, 테프론 테이프 (0) 2022.09.30 수온 조절 배관용 PTC 히터 (0) 2022.09.07