하드웨어

TIP122 트렌지스터 - LED - 아두이노/ESP32

pogop4321 2023. 1. 29. 17:02

 

#TIP122 - LED - 아두이노

#TIP122 - LED - ESP32

#관련글

#판매몰

#관련 부품 판매몰

 

 

#TIP122 - LED - 아두이노

   #결선도

#코드 

const int LED = 9;

void setup()
{
}

void loop()
{
  analogWrite(LED, 10);
  delay(1000);
  analogWrite(LED, 255);
  delay(1000);
  analogWrite(LED, 0);
  delay(1000);
}

 

#영상

 

#TIP122 - LED - ESP32

#결선도

#코드

const int LED = 33;
const int freq = 25000;
const int Channel0 = 0;
const int resolution = 8;

void setup()
{
ledcSetup(Channel0,freq,resolution);
ledcAttachPin(LED, Channel0);
}

void loop()
{
ledcWrite(Channel0, 10);
delay(1000);
ledcWrite(Channel0, 255);
delay(1000);
ledcWrite(Channel0, 0);
delay(1000);
}

 

#영상

 

#관련글

#관련 부품 판매몰