Communication
LED control
Used for light control.
| Address | Name | value | Description |
|---|---|---|---|
| 0 | R value | PWM cycle | Value for red LED |
| 1 | G value | PWM cycle | Value for green LED |
| 2 | B value | PWM cycle | Value for blue LED |
| 3 | W value | PWM cycle | Value for white LED |
| 4 | Transition time | ms | When color changed |
| 5 | Live mode | 0/any | Set values manifest themself |
| 6 | PWM cycle | any | Max color value (influence the PWM frequency) |
| 7 | PX counter | any | number of sensor activations |
| 8 | PX trigger | 0/any | sensor trigger |
Setting colors
In live mode, controller is setting outputs by RGBW registers. For setting different colors at the same time in one device, you can use write multiple registers. In case more devices, is needed to disable live mode, set color and enable live mode. Live mode can be set using broadcast message. After you enable live mode, controller smoothly change output by set values. Transition speed can be set by register 4 (transition time).
Proximity sensor control
For reading values of detection from sensor, read register 7 (PX counter).
PWM cycle
Changing PWM frequency is possible by setting PWM cycle. Max values of RGBW registers is same as the value of this register.
Max PWM cycle for channel A is 255! If you set this register higher than 255, the value for channel A will be 255.
Table of frequency change:
| PWM cycle | PWM frequency |
|---|---|
| 1000 | 19.4 KHz |
| 255 | 76 KHz |
| 100 | 192.6 KHz |
| 10 | 1.77 MHz |
System control
Contains resources for controlling the system.
Table of System control registers
| Address | Name | value | Description |
|---|---|---|---|
| 100 | Reset | 0/any | Restart device |
Configuration
All configured value will take effect after restarting the device.
Table of configuration registers
| Address | Name | value | Description |
|---|---|---|---|
| 1000 | Slave address | any | Modbus slave address |
| 1001 | Serial baud rate | 2400–57600 | RS485 baud rate |
| 1002 | Serial parity | 0,2,3 | 0=NONE, 2=EVEN, 3=ODD |
| 1003 | LED channel R | 0,1,2,3 | setting channel for red LED |
| 1004 | LED channel G | 0,1,2,3 | setting channel for green LED |
| 1005 | LED channel B | 0,1,2,3 | setting channel for blue LED |
| 1006 | LED channel W | 0,1,2,3 | setting channel for white LED |
| 1007 | Default TT | ms | setting default transition time |
| 1008 | Default R value | 0–PWMC | setting default active level red |
| 1009 | Default G value | 0–PWMC | setting default active level green |
| 1010 | Default B value | 0–PWMC | setting default active level blue |
| 1011 | Default W value | 0–PWMC | setting default active level white |
| 1012 | PWM cycle | any | default PWM cycle |
| 1013 | Light on start | 0/any | Lights up when the power up |
| 1014 | Proximity enable | 0/any | LED switch when closing up |
| 1015 | Proximity threshold | 0/any | For IR sensor calibration |
Every configuration change is damaging internal EEPROM!!!
Default stop bit value is 1.
Channel options
Table of channel configuration.
| Value | Description |
|---|---|
| 0 | Channel A |
| 1 | Channel B |
| 2 | Channel C |
| 3 | Channel D |