Overview

In this guide, you will learn how to sense the light level using a micro:bit. 

By use of a clever bit of coding the micro:bit's display LEDs can be used to measure the light level, without the need for any extra hardware. However, this feature is only available when using the JavaScript blocks editor. 

You can however attach a resistor and photoresistor to the micro:bit and use an analog input of the micro:bit to measure the light level. This has the advantage that once you know how to do this, you can attach other analog sensors to your micro:bit and make measurements with them.

Last updated on Mar 09, 2018 Published on Mar 09, 2018