Page 1 of 1

problem with light sensor and MP3 shield

PostPosted: Wed Sep 14, 2016 1:00 am
by smarques
Hi, I recently purchased an MP3 shield, and I am trying to use a light sensor to control the MP3 volume, but unfortunately when the mp3 is operating the signal that goes through the analog pins, across the shield and to arduino is completely unreliable and 'noisy'.
If I plug the sensor directly into arduino everything works fine.
If I plug the sensor through the shield and NOT call mp3.init() things work as well
When I call MP3.init() then the signal goes crazy and is not reliable any more.

Any hints on how to fix this?

Thank you
Sergio

Re: problem with light sensor and MP3 shield

PostPosted: Wed Sep 14, 2016 5:27 am
by bengchet
Hi,

Are you using A4 or A5 for your sensor? Just fyi, MP3 shield requires A4 and A5 pins to operate.

Re: problem with light sensor and MP3 shield

PostPosted: Wed Sep 14, 2016 10:31 pm
by smarques
Hi, thank you for your reply.
Is there a way to use any of the analog inputs? I tried with all of them, from the manual it seems that the shields uses all of them, is there any way to free a input for the sensor?

Thanks again
sergio

Re: problem with light sensor and MP3 shield

PostPosted: Fri Sep 16, 2016 9:28 am
by bengchet
Hi,

Apparently seems only analog pin A0 is available. If you plan to use pin A0, please check if there is any line randomSeed(analogRead(A0)) in void setup(). If so, remove that line.