#define LEDC_CHANNEL_0 0
// use 4 bit precission for LEDC timer
#define LEDC_TIMER_4_BIT 4
// use 113KHz Hz as a LEDC base frequency
#define LEDC_BASE_FREQ 113000
#define LED_PIN 5
void setup() {
// Setup timer and attach timer to a led pin
ledcSetup(LEDC_CHANNEL_0, LEDC_BASE_FREQ, LEDC_TIMER_4_BIT);
ledcAttachPin(LED_PIN, LEDC_CHANNEL_0);
ledcWrite(LEDC_CHANNEL_0, 7);
}
void loop() {
}
Your topic has been moved to this forum section as this location is more relevant to the subject
Please Auto format your code in the IDE, select all of it, use Copy for forum in the IDE and paste it here so that it is in code tags to make it easier to read and copy for examination
The easier you make it to read and copy the code the more likely it is that you will get help
#define LEDC_CHANNEL_0 0
// use 4 bit precission for LEDC timer
#define LEDC_TIMER_4_BIT 4
// use 113KHz Hz as a LEDC base frequency
#define LEDC_BASE_FREQ 113000
#define LED_PIN 5
void setup() {
// Setup timer and attach timer to a led pin
ledcSetup(LEDC_CHANNEL_0, LEDC_BASE_FREQ, LEDC_TIMER_4_BIT);
ledcAttachPin(LED_PIN, LEDC_CHANNEL_0);
ledcWrite(LEDC_CHANNEL_0, 7);
}
void loop() {
}
The Mosfet-IRZ44n and Resistor to the Gate is 10 Ohm and Inductor value-220uH, Capacitor-100nF.
Yes, I've used and it works.
I want to drive it with ESP32 PWM.
Tried directly connecting esp32 PWM out to driver board Mosfet gate pin, still doesn't seem to produce mist effect.