bump V3
This commit is contained in:
15
docs/blocks/logic/if.md
Normal file
15
docs/blocks/logic/if.md
Normal file
@ -0,0 +1,15 @@
|
||||
# @extends
|
||||
|
||||
## #examples
|
||||
|
||||
## Example: adjusting screen brightness
|
||||
|
||||
If the [light level](/reference/input/light-level) is `< 100`, this code sets the brightness to `255` when the button A is pressed:
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
if(input.lightLevel()<100){
|
||||
led.setBrightness(255);
|
||||
}
|
||||
})
|
||||
```
|
Reference in New Issue
Block a user