Figure 7-6 Arduino photon control LED
Figure 7-7 Arduino serial monitor
If we let the outside is much stronger, the value of photoresistor would decrease rapidly. This would let the value of the distribution voltage decreases rapidly, which cannot trigger the Port 8 as a high voltage level on the Arduino board. Therefore, the LED light connected to Port 8 CANNOT be lightened, as seen in Figure 7-8. We can change the strength of the light by using our mobile phone.
Figure 7-8 LED is dark by photoresistor
7.5 Key points and summaries
1) The value of photoresistor would be changed to be small along with the stronger outside light. So the value of voltage is so small that it cannot trigger the Port connected to LED light a high voltage level, which leads LED to be dark.
2) By utilizing the principle of distribution voltage, the photoresistor can control the LED light or dark with Arduino board.
3) Generally speaking, the values of light and dark photoresistor are given out in the product description.
4) Photoresistor is widely applied to the automatic control.