user29207: I'm trying to build a midi controller that takes the input from a photoresistor and a reed switch anemometer and outputs midi signal.
I've constructed the circuit as in the diagram below but when I test the inputs I receive only random numbers from analog input 3. I get a clear signal on A5.
I'm confused as to what's going on. I've seen other solutions to this problem mention the circuit not being grounded properly but as far as I can see I have the correct grounding.


user-1: Random numbers usually mean that the pin is floating (i.e. not touching anything)
You need to check your connections to A3.
Try this:

Remove the LDR and R6. Check their resistance using multimeter. (To see if they are not burnt etc.)
Connect R6 to its place. You should get 0 V (0) because R6 is connected to GND.
Remove R6 and put it in place of LDR. Now, you should be seeing 5V (1024) on A3.
After you complete this for R6, try it with using LDR only. You should see same results (Make sure LDR has some light on it to lower its resistance)
Put everything back in place. You should not be seeing random values because now everything is properly connected.

If you are still seeing random values, then that LDR may be disfunctional. Get another one.
Oh and one more thing, make sure LDR illumination does not change while you're getting readings. 

29207: <p>I'm trying to build a midi controller that takes the input from a photoresistor and a reed switch anemometer and outputs midi signal.</p>

<p>I've constructed the circuit as in the diagram below but when I test the inputs I receive only random numbers from analog input 3. I get a clear signal on A5.</p>

<p>I'm confused as to what's going on. I've seen other solutions to this problem mention the circuit not being grounded properly but as far as I can see I have the correct grounding.</p>

<p><a href="https://i.stack.imgur.com/eboyS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eboyS.png" alt="enter image description here"></a></p>
 -1: <p>Random numbers usually mean that the pin is floating (i.e. not touching anything)</p>

<p>You need to check your connections to A3.</p>

<p>Try this:</p>

<ul>
<li>Remove the LDR and R6. Check their resistance using multimeter. (To see if they are not burnt etc.)</li>
<li>Connect R6 to its place. You should get 0 V (0) because R6 is connected to GND.</li>
<li>Remove R6 and put it in place of LDR. Now, you should be seeing 5V (1024) on A3.</li>
<li>After you complete this for R6, try it with using LDR only. You should see same results (Make sure LDR has some light on it to lower its resistance)</li>
<li>Put everything back in place. You should not be seeing random values because now everything is properly connected.</li>
</ul>

<p>If you are still seeing random values, then that LDR may be disfunctional. Get another one.</p>

<p>Oh and one more thing, make sure LDR illumination does not change while you're getting readings. </p>
