# tv_bias_light
LED strip planning for TV bias lighting on ESP32 (ESP-IDF component). Give it
the TV diagonal, the strip density and the inset from the TV edge, and it
returns the 16:9 screen size, the strip length around the back of the TV and
the number of LEDs on the top, the sides and (optionally) the bottom, so you
can size the strip and set the LED count for your driver (for example
`espressif/led_strip`). Pure C, no hardware access.
```c
#include "tv_bias_light.h"
tv_bias_layout_t l;
if (tv_bias_plan(65.0f, 60.0f, 50.0f, 0, &l) == 0) {
// 65" TV, 60 LEDs/m, 50 mm inset, no bottom side:
// l.leds_top = 80, l.leds_side = 42, l.leds_total = 164
}
uint8_t r, g, b;
tv_bias_d65_rgb(128, &r, &g, &b); // D65 white at half brightness
```
Bias lighting is usually set to the D65 white point (6500 K), the white point
of sRGB/Rec.709 video; calibrate the strip itself if its white is off.
## Plan the whole wall
Bias lighting is often part of a TV media wall. The free
[Design Your Wall planner](https://getmediawall.com/design-your-wall) draws a
slat media wall to scale with a TV, fireplace or console and counts the panels
and cost. Made by [GetMediaWall](https://getmediawall.com), a US directory of
TV media wall builders and TV mounting installers.
## License
MIT
idf.py add-dependency "getmediawall/tv_bias_light^1.0.0"