Connecting open collector sensor to pin 12 (MISO)

Hi, I'm using Arduino 1. I'm detecting movement through an open collector sensor. Also I'm using a Sparkfun mp3 shield and the library Sparkfun-MP3-Player-Shield-Arduino-Library/SFEMP3Shield at master · madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library · GitHub

The idea is to reproduce an audio file once movement has been detected.

I'm connecting the sensor to pin 12 which as I have read corresponds to MISO. I'm able to have a loop where I'm detecting movement and reproduce the audio file once, but after a while it just stop working, it keeps detecting movement but not play the audio.

I'm not sure if I shouldn't connect the sensor to pin 12, because somekind of conflict.

Please help.

You've ruled out the mp3 shield?
You're able to make it play a file many times through programming?

Have you connected an external pullup resistor to the input or are you using INPUT_PULLUP? (Either way, but one or the other.)

I'm using INPUT_PULLUP. I'm able to make it play several times, but then, I still don't know the reason, it freezes trying to play it again.

So, if you add a Serial.print line to your sketch
Serial.print ("Play_It!");
that'll show up in Serial Monitor every time, but the mp3 doesn't go?

Yes, but is stuck trying to play.

jebema:
Yes, but is stuck trying to play.

What do you mean by stuck, do you see the message just before it is due to play and then it doesn't?

It keeps waiting the function PlayTrack which does not return any value.