Hi guys,

I have a problem with a arduino duemilanove atmega328 and the seeed music shield. I want to make it work together. It should work actually but I guess I am doing something wrong in the installation. I tried to follow the steps but something is not working with the portpin.h

here is the error code

/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp: In function 'void InitSPI()':
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:8: error: 'PB4' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:9: error: 'PB3' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:10: error: 'PB5' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:14: error: 'PB2' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp: In function 'void InitIOForVs10xx()':
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:42: error: 'PC1' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:43: error: 'PC2' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:44: error: 'PC3' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:45: error: 'PC0' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp: In function 'void InitIOForKeys()':
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:67: error: 'PD7' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:68: error: 'PD6' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:69: error: 'PD5' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:70: error: 'PD3' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:71: error: 'PD4' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp: In function 'void InitIOForLEDs()':
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:80: error: 'PB1' was not declared in this scope
/Users/user/Documents/Arduino/libraries/music_v1_13/config.cpp:81: error: 'PB0' was not declared in this scope

I attached a pic of my desktop to show the path where i placed the portpin.h file
I think this is where I am making a mistake.

Can anyone help me with this one please ?

Thanks heaps !!!

Capture d’écran 2011-05-10 à 14.50.13.png

It should be ok.
Anyway, you may try to restart the Arduino.

it is still not working unfortunatly.
I am pretty sure the problem doesnt come from the board, neither the shield because I am just trying to verify the sketch (not uploading), and still getting the same error msg.

I have tried to reinstall arduino latest version, arduino 0018. I erased the library, put them again, … still not working yet. It is not taking the portpins.h into account.

I work with mac os 10.6. Could it be that the files work for pc and could have a problem for mac ?

I hope we can find what’s wrong :slight_smile:



I have another question related to the project I am working on (for when everything will work with the music shield).

I want to make the shield play a song when someone will push a button (a capacitive sensor behind a window). When this is happening, there is also 3 neon lights that will be put on. Those lights are powered by 110v. I drive them with the arduino + relays.

Consequently, I need 4 pins to be available on the arduino. One input for the touch sensor and three outputs for the lights.

The schematic seems to show available pins :

analog 4 / 5
digital 0 / 1 / 11 / 12 / 13

Am i correct ? Can i use them while the shield is on the arduino duemilanove ? Shall i make some connection via the shield ?
Or would you advise to use a seeed mega ?

Thank you.

Yes, you are right, and you can make that on arduino duemilanove.

Thank you Steve !

What about the portpins.h file for mac ? Do you think of anything that may be the problem ? I am still stuck with that msg error for the moment.


hello jacob! I too had quite a hard time initially getting music shield to work on duemilanove and finally just bought a mega 1280 and no errors. I was able to get the program to play music on the duemilanove and uno but no buttons worked. (songs would just play in order loaded) I gave up on those ideas when I got the mega 1280 which worked flawlessly. I also tried a mega with 2560 which has different pin assignment and didn’t work correctly.

There is also mention of an ipod dock being able to power the arduino and music shield, but my bose dock does not.

I hope that helps. Please post your success.



thank you for the msg, its good to hear that I am not the only one having issues with it. I found other post on the wiki about this. I bought the shield with robotshop in canada and i let the technical support know about this problem. They said they would put someone on it next week to try to find whats wrong and how to fix it. I hope its gona work. Be assured that any things I learn about this I will share with everyone and I ll post the advance on the subject asap :slight_smile:

I was about to buy one seeedmega, that could be a solution. However, I think thats not fair from seeed, neither other reseller not to advertise this issue. When you buy it, its clearly stated that it works with arduino atmeg328, which implies it works fine on all of them, which is not the case apparently.

Anyways, that said, I would be really interested to know how you managed to make it work to play the song in loop. Could you post how you did it please ?

Have a great day.


Solved : The issues would come from the fact that code has not been tested on mac before being released. At least for mac user this is an answer. The shield is not working as seeed says on either arduino uno or duemilanove. I am fairly disapointed. Seeed should say something about this…

So the shield only works on PC and not on MAC?? I am having the same problem. I can’t even get it powered up on the Uno - it works fine on Duemilanove, but still the same error code.

  • frustrated - :imp:

Yes, that’s right. And it has been confirmed by the reseller.

Still waiting for seeed to give us some feedback

Hey Guys,

I’ve tested that the code of music shield works on Mac without any compiling error. However, I seldom use Mac and I’m not familiar with it.
From the error report, we can tell that it is the problem of portpins.h, which might be not properly replaced by the Seeed version.

So much Sorry for the inconvenience brought, please let me know what can I do to help you making the music shield work.



i followed the steps from the guidelines and at the beginning of the post there is the screen shot of where I placed the portpin file. This is where it should be, no ? Plus it doesn’t work for other mac users (maybe not all of them?). The reseller tried and it didn’t work either. There are other recent posts about issues.

If you can make it work smoothly on all plateform, that would be awesome.

Ok, I will post the instructions on how to make it work on Mac, though it’s actually the same as on Windows.


Steve, how can you say that since even the reseller agreed on the fact that its not working on mac following the existing instructions and using the existing files ? Plus I am not the only user who had troubles. Have you read the other threads that came after mine ?

this one for example : viewtopic.php?f=4&t=1966

and this one viewtopic.php?f=4&t=2017

I think you should just admit there is one problem and work with your customers instead of putting it like we dont know how to read the instructions.


I am having exactly the same problem using the Music Shield on an Arduino UNO.

Followed the instructions here: … sic_Shield

and get the following error
music.cpp: In function ‘void loop()’:
music:47: error: ‘Play’ was not declared in this scope

I am also on a Mac. Has anyone managed to make this work? SeeedStudio?