Getting analog instead of digital

I am doing my first project, i.e connecting an LDR to A0 pin and taking the values. while printing the values I got analog values whereas the video shows digital values.

No brother, please check your connections as per the guide video correctly and then you will get output in 2 columns. One shows the TIME as per you set and the other will show you the LIGHT INTENSITY value.
Moreover, you can download the data by clicking DOWNLOAD option shown below the data and create an excel document out of it.
Thank you :blush:

I think u didn’t get my question. In the video, the output graph has digital values .but i am getting analog

Can you please send me the exact screenshot so that I can get it.

@daspurnanga

Since you have connected the sensor to the A0 pin, you are expected to get analog o/p. The readings in the video are of a digital pin which is incorrect with context of the project.

The reading that you are getting are correct and you can proceed with the experiment.

But LDR is a device which is an analog device that converts light energy into electrical resistance that controls the flow of current and that intensity value in digital form is shown to us by the program we have written in JavaScript. thats why we are getting digital data though we connect the sensor to the A0 pin

thanks for telling that.

1 Like