2016-03-26 00:47:20 +01:00
# night light lesson
2016-04-02 01:22:47 +02:00
change the brightness of the BBC micro:bit.
2016-03-26 00:47:20 +01:00
### @video td/videos/night-light-0
## Topic
Set Brightness
## Quick Links
* [activity ](/microbit/lessons/night-light/activity )
* [challenges ](/microbit/lessons/night-light/challenges )
2016-03-31 00:54:19 +02:00
* [quiz ](/microbit/lessons/night-light/quiz )
* [quiz answers ](/microbit/lessons/night-light/quiz-answers )
2016-03-26 00:47:20 +01:00
## Prior learning/place of lesson in scheme of work
Learn how to **set brightness** of an image `set brightness` to set the brightness of the LED screen. We will be learning how to set the brightness of the LED screen using LED show LEDs, on button pressed and set brightness.
## Documentation
2016-03-30 01:17:34 +02:00
```docs
led.setBrightness(255)
input.onButtonPressed(Button.A, () => {
})
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
```
2016-03-26 00:47:20 +01:00
## Objectives
* learn how to set the brightness of the LED screen
* learn how to run code when an input button is pressed
* learn how to turn on all LEDs