Pin conflict

I am using the MP3 Player Shield from Sparkfun(SparkFun MP3 Player Shield - DEV-12660 - SparkFun Electronics) and the MPU-6050(https://www.sparkfun.com/products/11028) at the same time. But both of them uses the digital pin 2 and they can't work together. The MP3 shield uses it as "MP3-DREQ" as stated beside the pin and the MPU uses it as the interrupt pin. I tried all of the solution but none of them worked:

  1. Remap the pin in the MP3 library. I changed a line that declares the pin for the DREQ and it still don't work without pin 2.

  2. Bend the pin on the MP3 Shield so that it doesn't go into the Arduino. The MP3 won't work. It need the pin for sure.

  3. Use the pinchangeint library to create more interrupt pins: Google Code Archive - Long-term storage for Google Code Project Hosting. I'm not sure whether it helps because it is very unstable.

  4. Change the interrupt pin used my the MPU. I know there are 2 interrupt pins on the Arduino Uno but I failed to find where to make it uses the pin 3 instead of 2.

And now I'm running out of ideas and don't know what to do.. Has anyone used one of those and manage to remap either pin?

enemydodo:
I am using the MP3 Player Shield from Sparkfun(SparkFun MP3 Player Shield - DEV-12660 - SparkFun Electronics) and the MPU-6050(https://www.sparkfun.com/products/11028) at the same time. But both of them uses the digital pin 2 and they can't work together. The MP3 shield uses it as "MP3-DREQ" as stated beside the pin and the MPU uses it as the interrupt pin. I tried all of the solution but none of them worked:

  1. Remap the pin in the MP3 library. I changed a line that declares the pin for the DREQ and it still don't work without pin 2.

Pin 2 will be connected to some hardware on the MP3 shield, so by itself, that isn't gong to work.

enemydodo:
2. Bend the pin on the MP3 Shield so that it doesn't go into the Arduino. The MP3 won't work. It need the pin for sure.

What you need to do is both 1 and 2 and also connect pin 2 on the MP3 shield to whatever pin you remapped it to in the software. That should work as long as the MP3 software isn't using any special functions of pin 2, e.g. the interrupt.

enemydodo:
I am using the MP3 Player Shield from Sparkfun(SparkFun MP3 Player Shield - DEV-12660 - SparkFun Electronics) and the MPU-6050(https://www.sparkfun.com/products/11028) at the same time. But both of them uses the digital pin 2 and they can't work together. The MP3 shield uses it as "MP3-DREQ" as stated beside the pin and the MPU uses it as the interrupt pin. I tried all of the solution but none of them worked:

  1. Remap the pin in the MP3 library. I changed a line that declares the pin for the DREQ and it still don't work without pin 2.

  2. Bend the pin on the MP3 Shield so that it doesn't go into the Arduino. The MP3 won't work. It need the pin for sure.

  3. Use the pinchangeint library to create more interrupt pins: Google Code Archive - Long-term storage for Google Code Project Hosting. I'm not sure whether it helps because it is very unstable.

  4. Change the interrupt pin used my the MPU. I know there are 2 interrupt pins on the Arduino Uno but I failed to find where to make it uses the pin 3 instead of 2.

And now I'm running out of ideas and don't know what to do.. Has anyone used one of those and manage to remap either pin?

I think the line your looking for for the mpu is:

attachInterrupt(0, dmpDataReady, RISING);

Change that to 1 to use pin 3 on an uno. Considering all the rest of the code it seems odd that they hard coded int 0.

I tried this method. From the serial monitor I think it's working but I can hear no sound coming out of it..

dc42:

enemydodo:
I am using the MP3 Player Shield from Sparkfun(SparkFun MP3 Player Shield - DEV-12660 - SparkFun Electronics) and the MPU-6050(https://www.sparkfun.com/products/11028) at the same time. But both of them uses the digital pin 2 and they can't work together. The MP3 shield uses it as "MP3-DREQ" as stated beside the pin and the MPU uses it as the interrupt pin. I tried all of the solution but none of them worked:

  1. Remap the pin in the MP3 library. I changed a line that declares the pin for the DREQ and it still don't work without pin 2.

Pin 2 will be connected to some hardware on the MP3 shield, so by itself, that isn't gong to work.

enemydodo:
2. Bend the pin on the MP3 Shield so that it doesn't go into the Arduino. The MP3 won't work. It need the pin for sure.

What you need to do is both 1 and 2 and also connect pin 2 on the MP3 shield to whatever pin you remapped it to in the software. That should work as long as the MP3 software isn't using any special functions of pin 2, e.g. the interrupt.

This actually works!! Thank you!!

silasmoeckel:
I think the line your looking for for the mpu is:

attachInterrupt(0, dmpDataReady, RISING);

Change that to 1 to use pin 3 on an uno. Considering all the rest of the code it seems odd that they hard coded int 0.