소프트웨어

BTS7960 - LED / BTS7960 - 모터

pogop4321 2023. 1. 29. 08:28

 

#BTS7960 - LED - 아두이노

#BTS7960 - 모터 - 아두이노

#BTS7960 - LED - ESP32

#BTS7960 - 모터 - ESP32

#관련글

#판매몰

#관련 부품 판매몰

 

 

#BTS7960 - LED - 아두이노

#결선도

#코드

const int LED = 9;

void setup() {
pinMode(LED,OUTPUT);
analogWrite(LED,0);
}

void loop() {
for(int i=0; i<255; i++){
analogWrite(LED,i);
delay(50);
}
}

 

#영상



#BTS7960 - 모터 - 아두이노

 #결선도

#코드

const int motor_R = 9;
const int motor_L = 10;

void setup() {
}

void loop() {
analogWrite(motor_L, 0);
delay(500);

for(int i=0; i<255; i++){
analogWrite(motor_R, i);
delay(30);
}

analogWrite(motor_R, 0);
delay(500);

for(int i=0; i<255; i++){
analogWrite(motor_L, i);
delay(30);
}
}

 

#영상

 

#BTS7960 - LED - ESP32

 #결선도

#코드

const int pwmPin = 23;
const int freq = 200; // 주파수(Hz), LED 200Hz // 모터 20k ~25kHz // 회로 내장 BLDC 1k~20kHz(조절 안되거나 소음 발생할 수 있음)  
const int Channel = 0;
const int resolution = 8;

void setup()
{
  ledcSetup(Channel,freq,resolution);
  ledcAttachPin(pwmPin , Channel);
}

void loop()
{
  for(int i=0; i<255; i++){
  ledcWrite(Channel,i);
  delay(50);
  }  
}

 

#영상

 

#BTS7960 - 모터 - ESP32

 #결선도

#코드

const int motor_R = 22;
const int motor_L = 23;
const int freq = 25000; // 주파수(Hz), LED 200Hz // 모터 20k ~25kHz // 회로 내장 BLDC 1k~20kHz(조절 안되거나 소음 발생할 수 있음)
const int Channel0 = 0;
const int Channel1 = 1;
const int resolution = 8;

void setup()
{
  ledcSetup(Channel0,freq,resolution);
  ledcSetup(Channel1,freq,resolution);
  ledcAttachPin(motor_R, Channel0);
  ledcAttachPin(motor_L, Channel1);
}

void loop()
{
  ledcWrite(Channel1, 0);
  delay(500);

  for(int i=0; i<255; i++){
  ledcWrite(Channel0, i);
  delay(10);
}

  ledcWrite (Channel0, 0);
  delay(500);

  for(int i=0; i<255; i++){
  ledcWrite(Channel1, i);
  delay(10);
}
}

 

#영상

 

 

#관련글

 

#판매몰

 

BTS7960 모터드라이버

#BTS7960 - LED - 아두이노#BTS7960 - 모터 - 아두이노#BTS7960 - LED - ESP32#BTS7960 - 모터 - ESP32#BTS7960 - LED - 아두이노#결선도#코드const int LED = 9;void setup() { pinMode(LED,OUTPUT); analogWrite(LED,0);}void loop() { for(int i=0; i

yehaus.imweb.me