Main Site Documentation

Problem FEZ Music Shield with InputPort like button


#1

Hi,

I am using in my project the shield on the link below and it works perfectly.

http://www.ghielectronics.com/catalog/product/289

But when I put a InputPort button on the digital port for example 11 the following error occurs:


 #### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (1) ####
    #### Message: 
    #### Microsoft.SPOT.Hardware.Port::ReservePin [IP: 0000] ####
    #### Microsoft.SPOT.Hardware.SPI::.ctor [IP: 0036] ####
    #### GHIElectronics.NETMF.FEZ.Shields.MusicShield::.ctor [IP: 0078] ####
    #### ProjetoCA002.Program::Main [IP: 001a] ####
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.SPOT.Hardware.dll
Erro: Exception was thrown: System.InvalidOperationException

I am using the class as my driver MusicShield:

http://code.tinyclr.com/project/344/music-shield-extension-playing-streams/

If I take the shield and connect directly to my FEZ Domino the buttons work perfectly.

Important also am using a 16x2 LCD display with backlight.

Thanks.


#2

I think you are using a pin that is already used by the shield drivers.