Breakout pins - code and library

Hi there,

I am using breakout pins on board( fez cobra ii ) for G120 chip, I am not sure what library and code should I use for UART and GPIO pins for particular port. Is there any example available ?

I got this breakouts -

Any help would be great !!

If you want to use that breakout then you can just use the Cobra-II as a Gadgeteer mainboard using socket #5. On your breakout, the mainboard sockets pins will be…

#4 = TX (connect sensor RX here)
#5 = RX (connect sensor TX here)
#10 = GND

Alternatively, you can skip the Breakout module and socket and use the onboard extension pads on the Cobra-II and go straight NETMF. However, if you’re new then I’d recommend sticking with Gadgeteer.

For normal pins out on the board I used following code and it works.

public static SerialPort UART;

UART = new SerialPort("COM1", 9600);
tx_data[0] = 0xAA;
UART.Write(tx_data, 0, tx_data.Length);

But, lets say If i would like to use socket 1 breakout on the board, then how could I specify or configure that particular port and use UART of it ?

If you look at the schematic for the Cobra-II, you will see that socket #5 shares the same COM1 pins as #13 & #14 on the extension. So, your example is exactly what is needed to use socket #5. If, however, you want to use a second UART then you will need to use COM2 (#9 & #15) or COM3 (#4 & #6). The code would be the same except you would say “COM2” or “COM3” instead of “COM1”.