Updated Scripting Language (markdown)

gemu 2019-08-16 09:56:03 +02:00
parent 2f0c07d766
commit 6a294c7107
1 changed files with 2 additions and 1 deletions

@ -78,7 +78,7 @@ To save code space almost no error messages are provided. However it is taken ca
Copying a string to a number or reverse is supported
>`>B`
executed on BOOT time
executed on BOOT time and on save script
>`>T`
Executed on [`TelePeriod`](Commands#teleperiod) time (`SENSOR` and `STATE`), only put `tele-` vars in this section
@ -194,6 +194,7 @@ If you define a variable with the same name as a special variable that special v
`spin(x b)` set GPIO `x` (0..16) to value `b` (0,1). Only bit 0 of `b` is used - even values set the GPIO to `0` and uneven values set the GPIO to `1`
`spinm(x m)` set GPIO `x` (0..16) to mode `m` (input=0, output=1, input with pullup=2)
`ws2812(array)` copies an array (defined with `m:vname`) to the WS2812 LED chain. The array length should be defined as long as the number of pixels. Color is coded as 24 bit RGB.
`hsvrgb(h s v)` converts hue (0-360), saturation (0-100) and value (0-100) to RGB color
`#name` names a subroutine, subroutines are called with `=#name`
`#name(param)` names a subroutines with a parameter is called with `=#name(param)`