2018-05-13 11:37:02 +02:00
|
|
|
|
ESP8266 Software PWM Output
|
|
|
|
|
===========================
|
|
|
|
|
|
2018-11-14 22:12:27 +01:00
|
|
|
|
.. seo::
|
|
|
|
|
:description: Instructions for setting up ESP8266 software-based PWMs.
|
|
|
|
|
:image: pwm.png
|
|
|
|
|
|
2018-05-13 11:37:02 +02:00
|
|
|
|
The ESP8266 Software PWM platform allows you to use a software PWM on
|
|
|
|
|
the pins GPIO0-GPIO16 on your ESP8266. As this is only a software PWM
|
2018-12-12 16:24:43 +01:00
|
|
|
|
and not a hardware PWM (like the :doc:`ESP32 LEDC PWM <ledc>`) and has a key
|
|
|
|
|
disadvantage: There can be a noticeable amount of flickering with increased WiFi
|
|
|
|
|
activity.
|
2018-05-13 11:37:02 +02:00
|
|
|
|
|
|
|
|
|
If you need a stable PWM signal, it’s definitely recommended to use the
|
2018-06-01 18:10:00 +02:00
|
|
|
|
successor of the ESP8266, the ESP32, and its :doc:`ESP32 LEDC PWM <ledc>` instead.
|
2018-05-13 11:37:02 +02:00
|
|
|
|
|
2018-11-19 18:32:16 +01:00
|
|
|
|
.. code-block:: yaml
|
2018-05-13 11:37:02 +02:00
|
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
|
output:
|
|
|
|
|
- platform: esp8266_pwm
|
|
|
|
|
pin: D1
|
2018-11-13 12:02:59 +01:00
|
|
|
|
frequency: 1000 Hz
|
2018-05-13 11:37:02 +02:00
|
|
|
|
id: pwm-output
|
|
|
|
|
|
|
|
|
|
Configuration variables:
|
2018-10-12 16:33:22 +02:00
|
|
|
|
------------------------
|
2018-05-13 11:37:02 +02:00
|
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
|
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin to use PWM on.
|
|
|
|
|
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
2018-11-13 12:02:59 +01:00
|
|
|
|
- **frequency** (*Optional*, frequency): The frequency to run the PWM with. Lower frequencies
|
|
|
|
|
have more visual artifacts, but can represent much more colors. Defaults to ``1000 Hz``.
|
2018-06-01 18:10:00 +02:00
|
|
|
|
- All other options from :ref:`Output <config-output>`.
|
|
|
|
|
|
|
|
|
|
See Also
|
2018-10-12 16:33:22 +02:00
|
|
|
|
--------
|
2018-06-01 18:10:00 +02:00
|
|
|
|
|
|
|
|
|
- :doc:`/esphomeyaml/components/output/index`
|
|
|
|
|
- :doc:`/esphomeyaml/components/output/ledc`
|
|
|
|
|
- :doc:`/esphomeyaml/components/light/monochromatic`
|
|
|
|
|
- :doc:`/esphomeyaml/components/fan/speed`
|
|
|
|
|
- :doc:`/esphomeyaml/components/power_supply`
|
|
|
|
|
- :doc:`API Reference </api/output/esp8266-pwm>`
|
2018-06-04 08:17:22 +02:00
|
|
|
|
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/components/output/esp8266_pwm.rst>`__
|
2018-10-12 16:33:22 +02:00
|
|
|
|
|
|
|
|
|
.. disqus::
|