The Photoresistor Brick is made from a GL5528 photoresistor found in many Arduino starter kit.
The resistance of the photoresistor decreases as the light intensity increases. We can use a voltage divider circuit to estimate the resistance of the photoresister:
When light intensity is low, photoresistor has high resistance (several MΩ), so analog pin will read a value that is ~0V. When light intensity is high, photoresistor has very low resistance, so analog pin will read a value that is ~3.3V.
|3-pin JST XH connector (male)||1|
|M2 self-tapping screw||4|
Solder the red wire of the JST XH connector to one leg of the photoresistor. Solder a 10KΩ resistor and the yellow wire to the other leg. Solder the black wire to the other end of the resistor.
Print out the enclosure parts on a 3D printer.
Align the photoresistor in the hole (photo-sensor side up) on the top half and arrange the wires in the grooves. Secure with a small amount of hot glue.
Mount the top piece with 4 x M2 screws.
Line up two 2x1 brickbases on a faceplate, two rows apart. Surround the brickbases with a few other bricks to assist in alignment.
Add two drops of super glue on each brickbase and mount the module. Press and hold for 60s.
The finished module: