LDR Light sensor


Out of stock

SKU: LDR Category:


microbit light sensor connectionsAn external light sensor for all your light sensing needs.

The black lead goes on GND, the red lead goes on 3v and the other lead goes on 0, 1, or 2.

This item is polarity sensitive, the red & black leads need to be on the correct connections for increasing light to provide an increasing value. There is no harm caused by incorrect connections.

Use the analog input blocks to read the sensor value:

microbit read and display analog

Click to enlarge

You can use any one of the three pins 0, 1 or 2.

The value will vary between 0 and 1024 – the full range of the micro:bit analog input. Typical values will be under 200 for dark, 600+ for in view of a light, 950+ when held to a torch or lamp.

This code block example assumes the sense lead is on the connector marked 1. It will show B (for Bright), or D (for Dark) or ? (for in between).

microbit Light Sensor example code

Click to enlarge


There are no reviews yet.

Be the first to review “LDR Light sensor”

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.