You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Instructions on how to setup pwm leds within Home Assistant."
4
+
description: "Instructions on how to setup PWM LEDs within Home Assistant."
5
5
date: 2017-04-04 13:00
6
6
sidebar: true
7
7
layout: page
@@ -11,40 +11,64 @@ footer: true
11
11
ha_category: Light
12
12
ha_iot_class: "Local Push"
13
13
ha_release: 0.43
14
+
logo: raspberry-pi.png
14
15
---
15
16
16
-
The `rpi_gpio_pwm` platform allows to control multiple lights using pulse-width modulation, for example led strips. It supports one-color, RGB and RGBW leds driven by GPIOs of an Raspberry Pi or a PCA9685 controller.
17
+
The `rpi_gpio_pwm` platform allows to control multiple lights using pulse-width modulation, for example led strips. It supports one-color, RGB and RGBW LEDs driven by GPIOs of a Raspberry Pi or a PCA9685 controller.
17
18
18
-
### {% linkable_title Configuration %}
19
+
To enable this platform, add the following lines to your `configuration.yaml`:
19
20
20
21
```yaml
21
22
# Example configuration.yaml entry
22
23
light:
23
-
platform: rpi_gpio_pwm
24
-
leds:
25
-
# One-color led directly connected to GPIO
26
-
- name: Lightstrip Cupboard
27
-
driver: gpio
28
-
pins: [17]
29
-
type: simple
30
-
# RGB led connected to PCA9685 controller
31
-
- name: TV Backlight
32
-
driver: pca9685
33
-
pins: [0, 1, 2] # [R, G, B]
34
-
type: rgb
35
-
# RGBW led connected to PCA9685 controller
36
-
- name: Lightstrip Desk
37
-
driver: pca9685
38
-
pins: [3, 4, 5, 6] # [R, G, B, W]
39
-
type: rgbw
24
+
- platform: rpi_gpio_pwm
25
+
leds:
26
+
- name: Lightstrip Cupboard
27
+
driver: gpio
28
+
pins: [17]
29
+
type: simple
40
30
```
41
31
42
32
Configuration variables:
43
33
44
-
- **leds** array (*Required*):
45
-
- **name** (*Required*): The name of the led.
46
-
- **driver** (*Required*): The driver, which controls the led. Choose either `gpio` or `pca9685`.
47
-
- **pins** (*Required*): The pins connected to the led. The order of pins is determined by the specified type.
48
-
- **type** (*Required*): The type of led. Choose either `rgb`, `rgbw` or `simple`.
34
+
- **leds** array (*Required*): Can contain multiple LEDs.
35
+
- **name** (*Required*): The name of the LED.
36
+
- **driver** (*Required*): The driver which controls the LED. Choose either `gpio` or `pca9685`.
37
+
- **pins** (*Required*): The pins connected to the LED as a list.. The order of pins is determined by the specified type.
38
+
- **type** (*Required*): The type of LED. Choose either `rgb`, `rgbw` or `simple`.
49
39
- **freq** (*Optional*): The PWM frequency. (Default: `200`)
50
40
- **address** (*Optional*): The address of the PCA9685 driver. (Default: `0x40`)
41
+
42
+
## {% linkable_title Examples %}
43
+
44
+
In this section you find some real life examples of how to use this sensor.
45
+
46
+
### {% linkable_title RGB LED connected to PCA9685 controller %}
47
+
48
+
This example uses a [PCA9685 controller](http://www.nxp.com/products/interfaces/ic-bus-portfolio/ic-led-display-control/16-channel-12-bit-pwm-fm-plus-ic-bus-led-controller:PCA9685) to control a RGB LED.
49
+
50
+
```yaml
51
+
# Example configuration.yaml entry
52
+
light:
53
+
- platform: rpi_gpio_pwm
54
+
leds:
55
+
- name: TV Backlight
56
+
driver: pca9685
57
+
pins: [0, 1, 2] # [R, G, B]
58
+
type: rgb
59
+
```
60
+
61
+
### {% linkable_title RGBW LED connected to PCA9685 controller %}
62
+
63
+
This example uses a [PCA9685 controller](http://www.nxp.com/products/interfaces/ic-bus-portfolio/ic-led-display-control/16-channel-12-bit-pwm-fm-plus-ic-bus-led-controller:PCA9685) to interact with a RGBW LED.
0 commit comments