How can I use PWM to vary the amount of power to a very small vibrator motor
Lilypad vibe? I am using pin 26 for output. Any help would be appreciated.
2 Answers
hi;
esp32 with PWM pinMode(LED,OUTPUT); // configure LED PWM functionalitites ledcSetup(ledChannel, freq, resolution); // attach the channel to the GPIO2 to be controlled ledcAttachPin(LED, ledChannel); //send PWM ledcWrite(ledChannel, 102);
circuits4you.com/2018/12/31/esp32-pwm-example/
ESP32 with DC Motor and L298N Motor Driver – Control Speed and Direction
techtutorialsx.com/2017/06/15/esp32-arduino-led-pwm-fading/
with esp8266 its analogWrite()
circuits4you.com/2017/12/21/esp8266-pwm-example/
Hope it helps