I have the Xbee Module connected on the XBee socket on my Cerbuino Bee. And now I want to use the UART on the Arduino headers.
The problem is that I get the following error when trying to run the programm:
[quote]A first chance exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.dll
A first chance exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll
An unhandled exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll[/quote]
After hours of troubleshooting, I found out that the error only occurs when I use the Xbee Module AND the UART.
The error occurs in the Line ‘wifiBoard = new WiFlyGSX()’
If I initialize the wifi board before the Uart , than the error occurs on ‘servoUart = new SerialPort(“COM1”, 9600);’
I tried the Uart seperately in another project and it worked.
So the wifi module has to be assigned to COM1.
The only option is to use the second UART on COM2, but I wont do that because I need the Gadgeteer socket.
I only need to send data (to a SSC-32 servo controller), is there a way to use a Soft UART or something else?
Or maybe a better solution?
A first chance exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.dll
A first chance exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll
An unhandled exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll