b'Circuit 1C:circuit, youll be using a photoresistor, which changes resistance based on how Photoresistor much light the sensor receives. Using this sensor you can make a simple night-light In circuit 1B, you got to use a potentiometer, which varies resistancethat turns on when the room gets dark based on the twisting of a knob. In thisand turns off when it is bright.YOU NEEDLED PHOTORESISTOR 330 RESISTOR 10K RESISTOR 7 JUMPER WIRESNEWVOLTAGE DIVIDERS CONTINUED: COMPONENTS Since the RedBoard cant directly interpret resistance (rather, it reads voltage), we PHOTORESISTORS are light- need to use a voltage divider to use our sensitive, variable resistors. Asphotoresistor, a part that doesnt output 10k100kmore light shines on the sensorsvoltage. The resistance of the photoresistor 330 10k100k330head, the resistance between itschanges as it gets darker or lighter. That two terminals decreases. Theyrechanges or divides the voltage going an easy-to-use component inthrough the divider circuit. That divided projects that require ambient- voltage is then read in on the analog to light sensing. digital converter of the analog input.NEW CONCEPTS The voltage divider equation: ANALOG TO DIGITAL CONVERSION: In order to have the RedBoard sense analog signals, we must first pass them throughRan Analog to Digital Converter (or ADC).V =V 2The six analog inputs (A0A5) coveredout in R +Rin the last circuit all use an ADC. These1 2pins sample the analog signal and create a digital signal for the microcontroller toassumes that you know three values of interpret. The resolution of this signal isthe above circuit: the input voltage (V in ), based on the resolution of the ADC. In theand both resistor values (R 1and R 2 ). If R1 case of the RedBoard, that resolution is 10- is a constant value (the resistor) and R2 bit. With a 10-bit ADC, we get 2 ^ 10 = 1024fluctuates (the photoresistor), the amount possible values, which is why the analogof voltage measured on the Vout pin will signal can vary between 0 and 1023. also fluctuate. 26 : circuit 1c'