• 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 4 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 4 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 4 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] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

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

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

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.