I used the input device in assignment 10 to create a simple software that indicates the changing values of the phototransistor in an interactive way. When i prevent light from the phototransistor the brightness of the red color decreases and vice versa.
Using Arduino
Using arduino and serial communication, I programmed the IC. After uploading the code, the serial monitor showed different values according to change in light resistance value as shown below.
After programming the LDR circuit, I tried to use it with processing as an indicator for the LDR given values.
using Processing
The simple application is an indicator of the effect of the LDR.
At the top of the page you will find a video of the proccesing LDR indicator.
A code for the serial and the LDR, to connect the input of the LDR and make it send messages to processing in form brightness.
Steps:
![]() |
![]() mariam-wael |