Breadboard Layout

Push the wires of the photoresistor and resistor into the breadboard in the positions shown below. Note, it doesn't matter which way around the leads go for either the resistor or photoresistor.

Then connect the breadboard to your micro:bit using the alligator clip to male header pin leads.

The photoresistor and fixed value resistor (2.2kΩ) are in an arrangement called a voltage divider. The point where they are connected (called the voltage divider's output) together will have a voltage that depends on the ratio of the two resistors. Since the fixed resistor never changes value, then the photoresistor (whose resistance varies with the amount of light falling on it) will control the voltage at this point. This voltage is connected by the yellow lead to pin 2 of the micro:bit which is used as an analog input to measure this voltage.

If the photoresistor is very brightly lit then it will have a low resistance and the output voltage will be 'pulled up' towards 3V. If on the other hand the photoresistor is in the dark, it will have a very high resistance and the fixed value resistor will dominate, pulling the voltage down towards 0V.

This guide was first published on Mar 09, 2018. It was last updated on Mar 09, 2018. This page (Breadboard Layout) was last updated on Mar 09, 2018.