Difference between revisions of "PWM GPIO"

From Let's Control It
Jump to navigation Jump to search
Line 8: Line 8:
 
This feature can be used to dim lights, control (DC)-fan speeds, etc.  
 
This feature can be used to dim lights, control (DC)-fan speeds, etc.  
  
Be aware that the direct GPIO has currently an "heartbeat" issue where flickers can occur. If that is critical to your application you can use the [[PCA9685 | PCA9685]
+
Be aware that the direct GPIO has currently an "heartbeat" issue where flickers can occur. If that is critical to your application you can use the [[PCA9685 | PCA9685]]
  
 
=== Example ===
 
=== Example ===
  
 
[[File:Nodemcu pwm mosfet.png | 640px]]
 
[[File:Nodemcu pwm mosfet.png | 640px]]

Revision as of 18:58, 22 April 2017

PWM control

It is also possible to output an PWM signal on the GPIO pins.

To set a certain PWM level:

http://<ESP IP address>/control?cmd=PWM,<pin>,<level>

This feature can be used to dim lights, control (DC)-fan speeds, etc.

Be aware that the direct GPIO has currently an "heartbeat" issue where flickers can occur. If that is critical to your application you can use the PCA9685

Example

Nodemcu pwm mosfet.png