problem with light sensor and MP3 shield

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

problem with light sensor and MP3 shield

Postby smarques » Wed Sep 14, 2016 1:00 am

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
smarques
Greenhorn
 
Posts: 2
Joined: Wed Sep 14, 2016 12:53 am

Re: problem with light sensor and MP3 shield

Postby bengchet » Wed Sep 14, 2016 5:27 am

Hi,

Are you using A4 or A5 for your sensor? Just fyi, MP3 shield requires A4 and A5 pins to operate.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: problem with light sensor and MP3 shield

Postby smarques » Wed Sep 14, 2016 10:31 pm

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
smarques
Greenhorn
 
Posts: 2
Joined: Wed Sep 14, 2016 12:53 am

Re: problem with light sensor and MP3 shield

Postby bengchet » Fri Sep 16, 2016 9:28 am

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.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 15 guests

cron