pxt-calliope/docs/reference/led/toggle-all.md

29 lines
596 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Toggle All
2016-04-13 17:27:45 +02:00
Toggle all the 25 LEDs on the [LED screen](/device/screen) - if an LED is on before the function is called, it will be off after; if an LED is off before the function is called, it will be on after.
2016-03-26 00:47:20 +01:00
```sig
led.toggleAll()
```
### Parameters
* none
### Example
The following code will result in every LED being on except for the LED at coordinate (2,2)
```blocks
basic.clearScreen()
led.plot(2, 2)
led.toggleAll()
```
![](/static/mb/toggle-all-0.png)
### See also
2016-04-13 17:27:45 +02:00
[toggle](/reference/led/toggle), [LED screen](/device/screen), [clear screen](/reference/basic/clear-screen)
2016-03-26 00:47:20 +01:00