Features - Light Strip Painting
Function Introduction
- The light strip painting capability is mainly used for light strip categories, allowing users to customize the coloring of the light strip to enrich the playability of the light strip.
- The DP color value of the graffiti color light adopts the HSV color model, and the string value corresponding to the HSV model color is sent through the panel.
- Hue (H) Hue adjustment range: 0-360, the range of the value sent by the panel is 0-360, and the color ring adjustment range and the value sent by the panel are in a linear correspondence.
- Saturation (S) Saturation adjustment range: 0%-100%, the range of the value sent by the panel is 0-1000, and the color ring adjustment range and the value sent by the panel are in a linear correspondence.
- Brightness (V) Brightness adjustment range: 1%-100%, the value range sent by the panel is 10-1000, and the color wheel adjustment range and the value sent by the panel are linearly corresponding.
- Color light supports display:
DP protocol
- paint_colour_data DP details
- White light mode:
- Color light, color card mode:
- Combination mode
How to develop
- Lamp strip component implementation reference
- After installation, the specific implementation logic is described in
node_module/@ray-js/lamp-strip-light-smear/src/README.md
- After installation, the specific implementation logic is described in
- Monitor and report DP according to UI interaction
Notes
- Apply the UI implementation of the light strip:
- Canvas/SVG + collision detection can be used in the applet to achieve this.
- In RN, the corresponding image is used to dynamically modify the color and its gradient color.
- Problems with synchronizing the status of the light strip and the device
- Because the DP point only saves the data of the most recent application, the data of white light and color light needs to be stored in the cloud (separate storage is recommended) to synchronize the status of the panel and the device
- When the button or remote control operates the lamp, listen to the DP status synchronization
Related materials
- [Function page]:
- None
- [Component]:
- [Tutorial]:
- [SDK]:
- None
- [API]:
- None