Core Lab Objects CT / HW1

Photocell

  • What it does?

This is a light sensor that changes resistance in a circuit depending on how much light it is exposed to. The Photocell produces a resistance of 8-20 kΩ under normal light. The resistance can drop to near 0Ω by shining an LED near it.

  • Ways to connect it to a Arduino?

The Photocell is basically a resistor so it can be connected through digital and analog pins.

  • Fritzing schematic.

  • Library required to run the photocell.

The photocell can be run using the Serial library using the AnalogRead function.

Serial is used for communication between the Arduino board and a computer or other devices. All Arduino boards have at least one serial port. It communicates on digital pins 0 and 1  as well as with the computer via USB. Thus, if you use these functions, you cannot also use pins 0 and 1 for digital input or output.

Leave a reply

Skip to toolbar