pxt-calliope/docs/reference/led/toggle-all.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR ()
* Accessibility changes
2017-09-07 13:42:08 -07:00

622 B

Toggle All

Toggle all the 25 LEDs on the LED 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.

led.toggleAll()

Parameters

  • none

Example

The following code will result in every LED being on except for the LED at coordinate (2,2)

basic.clearScreen()
led.plot(2, 2)
led.toggleAll()
basic.clearScreen()
led.plot(2, 2)
led.toggleAll()

See also

toggle, LED screen, clear screen