mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Another option for Ws2812 - direct spi from the pi with 1 wire (#631)
* Removed -HUP so the default -TERM signal is sent instead. - hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config Changed pgrep to add '-x' so it wont partial match on the exe name. - I have multiple instances with multiple hyperiond-instance1 names - this ensures the service script only kills the right process * reversing errant change to hyperion.systemd.sh * This add a new device type - ws2812spi. I've (ab)used the SPI interface to send the correct timing pulses to keep the ws2812 happy. THE RATE IS IMPORTANT! A FIXED CORE_CLK IS IMPORTANT! Attach the SPI MOSI pin on the Pi to the DIN pin on your ws2812 "device" : { "name" : "MyPi", "type" : "ws2812spi", "colorOrder" : "grb", "output" : "/dev/spidev0.0", "rate" : 3800000 }, * updated hyperiond.test-binary * Updated default SPI speed to the "correct" value. My Pi was undervolted so was dropping the core clock confusing everything * Code cleanups explicitly set the final 3 bytes to 0 * Removed latchtime option - not applicable * updated test binary Former-commit-id: d3c19c8374999f7a554bb25ca181a8a483f86289
This commit is contained in:
@@ -75,6 +75,7 @@ if(ENABLE_SPIDEV)
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceLpd8806.h
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceP9813.h
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceWs2801.h
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceWs2812SPI.h
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceAPA102.h
|
||||
)
|
||||
SET(Leddevice_SOURCES
|
||||
@@ -84,6 +85,7 @@ if(ENABLE_SPIDEV)
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceLpd8806.cpp
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceP9813.cpp
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceWs2801.cpp
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceWs2812SPI.cpp
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceAPA102.cpp
|
||||
)
|
||||
endif(ENABLE_SPIDEV)
|
||||
|
Reference in New Issue
Block a user