• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32, PWM and a Small Vibrator Motor

Q&A Forum › ESP32, PWM and a Small Vibrator Motor
0 Vote Up Vote Down
Steven Skindell asked 3 years ago

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
0 Vote Up Vote Down
DK answered 3 years ago

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 PWM with Arduino IDE

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

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi Steven.
Were you able to solve your problem with DK tips?
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Firebase Web App with ESP32 and ESP8266 (version 1.2) April 25, 2022
  • [eBook Updated] MicroPython Programming with ESP32 and ESP8266 (version 1.3) February 7, 2022

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2022 · RandomNerdTutorials.com · All Rights Reserved