Ijust had to measure light levels, so i pulled up my wery first arduino board and started liiking for a LDR.
I could not find any LDR, so i tried using a LED instead. But something is really odd.
What is this noise pattern in my readings?
Besides the noise it works fine and the LED is giving me a fine sensitivity. At least for now.
Have i fried the build in ADC? I tried all 4 analog inputs on my old Duemillenove, and they are all the same. (I have not used the build in adc for years, but im using bigher sampeling exsternal chips.
LEDs are photodiodes and generate a voltage and current when exposed to light. The "noise" might be the overhead lights, especially if fluorescent lamps.
Check the polarity of the LED (try both orientations).
The code is as in the picture.
Chematichs is simply the LED on GND, and to A0(or any adc)
The room is only lit with sunlight.
Every other adc reading is 0.
Hi forum police. Im sorry if you do not understand how a led can be connected to two ports.
But the LED is connected to GND and to A0.
And yes. The polarity is right.
Unplugging the LED gives floating values, but wit no zero values for every second reading.
I think I will try with a different board tomorrow.
I'm forum help. I'm merely asking you for necessary information and direct answers to my questions, that might lead to a solution. If you want to redefine and dictate the procedures that have been in place here for almost 10 years, you can try. But very few helpers here will buy into that. Good luck.