diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-29 21:02:37 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-29 21:02:37 -0700 |
commit | 9caddf6c5c0dce43a531c3dc8cf2831195ea0876 (patch) | |
tree | ce9156f0a46330b3d7bf9915fcf7430d1556fe98 /include/drv/ws2812B/ws2812b.h | |
parent | 953b8db36d684829baa9cf669be1b799c8a01d46 (diff) | |
download | stm32l4-9caddf6c5c0dce43a531c3dc8cf2831195ea0876.tar.gz stm32l4-9caddf6c5c0dce43a531c3dc8cf2831195ea0876.tar.bz2 stm32l4-9caddf6c5c0dce43a531c3dc8cf2831195ea0876.zip |
The lights really work this time.
I also found out that the noise in the lighhts was coming from the USB
debug interface. For whatever reason it doesn't appear that the spi pins
are not well isolated from the debugger noise so unplugging and running
off one power source works pretty well.
Diffstat (limited to 'include/drv/ws2812B/ws2812b.h')
-rw-r--r-- | include/drv/ws2812B/ws2812b.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/drv/ws2812B/ws2812b.h b/include/drv/ws2812B/ws2812b.h index bc86cc5..5ae41aa 100644 --- a/include/drv/ws2812B/ws2812b.h +++ b/include/drv/ws2812B/ws2812b.h @@ -15,7 +15,7 @@ static_assert(sizeof(rgb_t) == 3, "Sizeof rgb_t should be 3."); uint8_t* ws2812b_compile_rgb(rgb_t* out, size_t arr_len); -/* Returns sin((n - 128) / 256) * 256. */ +/* Returns round(sin(2πn / 256) * 127.5 + 127.5). */ uint8_t byte_sin(uint8_t n); #endif /* WS2812B_H_ */ |