LDR with BBC micro:bit

LDR with BBC micro:bit

Let’s learn to use an LDR sensor or photoresistor with BBC micro:bit.

This is a very simple project. We are going to print “BRIGHT” in the inbuild LED matrix of the micro:bit if there is light in the room or else “DARK” will be printed.

Hardware Required

Components
Amazon.inamazon
Amazon.comamazon
Banggood.combanggood
AliExpressali express
Utsourceutsource
BBC micro:bit
cart icon
cart icon
cart icon
cart icon
cart icon
cart icon
cart icon
cart icon
cart icon
Resistors(10k)
cart icon
cart icon
cart icon
cart icon
cart icon

Circuit

BBC micro:bit with LDR (photoresistor) sensor
  • Connect one of the terminal of LDR to the pin 0 of the micro:bit.
  • Then connect the other terminal of the LDR to the 3v of micro:bit.
  • Finally, connect a 10k resistor in-between ground of the micro:bit and the pin 0.

Block Code

block code for using LDR with BBC micro:bit

JavaScript Code

Video

To buy electronic components order from UTSOURCE

Leave a Reply