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

33 lines
625 B
Markdown
Raw Permalink 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()
```
2016-09-01 14:08:27 +02:00
```sim
basic.clearScreen()
led.plot(2, 2)
led.toggleAll()
```
2016-03-26 00:47:20 +01:00
### 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