Alone in the Dark

Challenge

At some point in the middle of the night I’m sure you will have tripped over the corner of bed or stood on that plastic object left on the floor.

Maybe your children are scared of the dark but the main light is too bright to be left on.

The challenge is to build a smart night light that adjusts its own brightness depending on the light level in the room. 

Use the in-built light sensor and LED array brightness settings to program the night light to your requirements. 

Additional Challenge

  • Program to have selected LEDS lit up to add some life into your nightlight!
  • Program a mood lamp which changes colour in response to different ambient temperature environments.

Learning Points

  • Use of in-built light sensor
  • Use of ‘Set Brightness’ block
  • Display on micro:bit LED Array

Block Editor Code

Click the button below to download the block editor code for this challenge. The hex file is contained in a zip folder.

Kindly refer here for instructions on importing code into Micro:bit. 

This code can be imported into the micro:bit block editor.

Keep in Touch

We would love to keep in touch with you and as a result aid you along your digital making journey.

Becoming a digital maker subscriber means you will receive exclusive offers and we will keep you up to date with new resources and kits, as well as upcoming events and workshops.

Let us know how your digital maker journey is progressing. Send us pictures and videos of your awesome creations and use the hashtag below.

#digitalmakerjourney