M1004 S0 P[ppp]
If the user does not save DIY configuration, the default will be restored after restarting.
Currently saved parameters include
P
: Command selection (0-1), 1: storage configuration, 0: erase configurationThe current settings support individual control of each color in the light strip for more complex mode settings.
M1004 S1 L[lll] M[mmm] B[bbb] T[sss] O[ooo] F[fff]
L
: LED index (0-5), expansion board supports two strips, each containing RGB three colors.M
: LED Mode (0-2)B
: Brightness setting (0-255)T
: Relative start time (0-65535 ms), this parameter is used for the delay control of the light strip, and this parameter will be explained after introducing all the parametersO
: On time in breath/blink mode (M = 1, 2) (0-65535 ms)F
: Off time in breath/blink mode (M = 1, 2) (0-65535 ms)For example, to achieve RGB alternating flashing of lights, take the light strip 0 as an example (LED indices are 0, 1, 2, respectively), the command is as follows
M1004 S1 L0 M2 B255 T0 O500 F1000
M1004 S1 L1 M2 B255 T500 O500 F1000
M1004 S1 L2 M2 B255 T1000 O500 F1000
The above configuration indicates that RGB cycle of the three-color lights is 1500 milliseconds (O500 + F1000), the first 500ms is turned on and the next 1000ms is turned off during the cycle, and LED0 starts to execute from time 0 (T = 0), LED1 starts to execute from 500ms (T = 500), and LED2 starts to execute from 1000ms (T = 1000).
In this way, when L0 is turned off at 500ms, L1 is lit; when L1 is turned off at 1000ms, L2 is lit. In this way, RGB tri-color alternating flicker is realized.
M1004 S2 I[iii] B[bbb]
I
: LED Strip Index (0-1)
B
: Brightness (0-255)
This command controls the RGB brightness of the LED light strip at the same time, without changing the color. Note that if the sliding rheostat or the reserved AD interface is configured to control the LED brightness, when the AD sampling value changes, the setting of this command will be overwritten.
M1004 S3 I[iii] F[fff] D[ddd] T[ttt] B[bbb]
I
: Servo index (0-1)F
: PWM frequency (hz), general steering gear control frequency is 50Hz (20ms)D
: PWM duty cycle, the PWM duty cycle range of general servo control is 0.025-0.125 (pulse width 0.5ms-2.5ms)T
: [Optional] When the sliding rheostat is configured for servo control, this parameter limits the maximum value of the duty cycle adjustment range, which is 0.125 by defaultB
: [Optional] When the sliding rheostat is configured for servo control, this parameter limits the minimum value of the duty cycle adjustment range, which is 0.025 by defaultM1004 S4 F[iii] P[ppp]
F
: Fan index (0-3)P
: Speed/Switch (0-100):M1004 S5 F[fff] P[ppp]
F
: Focus (0-1), F=0: turn off; F=1: turn onP
: Photo (0-1), P=0: no effect; P=1: take a photoJust set one of the above parameters
M1004 S6 I[iii] F[fff] D[ddd]
I
: Sliding Potentiometer Index (0-1)F
: Function selection, supports the following functions:D
: Control device index.M1004 S7 I[iii] F[fff] D[ddd]
I
: I switch index (0-1)F
: Function selection, supports the following functions:D
: Control device index.M1004 S8 P[ppp]
P
: Switch parameters (0-1), 0 disconnected, 1 connectedM1004 S9 P[ppp] F[fff]
P
: Switch parameters (0-1), 0 off, 1 onF
: Frequency setting, the frequency range supported by the buzzer is 2000~5000hz (V1 hardware does not support this parameter)M1004 S10 D[ddd] P[ppp]
D
: Rotation direction (0-1)P
: Speed (r/min)M1004 S11 T0 I[iii] D[lll] P[ppp]
M1004 S11 T1 I[iii] F[fff] D[ddd]
M1004 S11 T2 I[iii] F[fff] D[ddd]
T
: reserved IO type ofI
: GPIO Index (4-17)O
: GPIO direction (0-1), 0 input, 1 outputP
: When O is 0, the control input function is as the same as that of the switch. Please refer to the switch function configuration (S=7).When O is 1, control the output level (0-1), 0 low, 1 high
D
: When O is 0, Control the device index.I
: PWM pin index (currently only 0)F
: PWM frequency (Hz), 100-100kD
: PWM output duty cycle, float between 0 and 1, for example 0.02I
: ADC Pin Index (0-2)F
: Function selection, all functions are the same as the sliding potentiometer. Please refer to the sliding potentiometer function configuration (S=6)D
: Control the device index. For example, the function is to control the fan, this parameter specifies the fan number.