# Communication

## XBee-compatible socket

M2 has an *XBee-compatible form factor socket* on the top of the processor board. In other words: two 2mm pitch x 10 pin headers spaced 22mm apart. You an read more about [XBee modules on Wikipedia](https://en.wikipedia.org/wiki/XBee)

![](https://1875989339-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lhg5aaQ-eiSLOcDoH85%2F-Lhg646e0zcy2Yk5d5Sb%2F-Lhg6DP-eGIoLUpnRAeW%2Fconnectable60ba.png?generation=1560886969641180\&alt=media)

There are LOTs of modules that fit this socket, with many different functions. WiFi, BLE, GSM, LTE, Ethernet, etc.

When connecting a *XBee-compatible form factor socket* to M2, makes sure that is is oriented so that pin 1 (+3.3V) is at the corner nearest the USB socket as shown here:

![](https://1875989339-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lhg5aaQ-eiSLOcDoH85%2F-Lhg646e0zcy2Yk5d5Sb%2F-Lhg6DP12R4TTBGsP1xv%2FXBEE_labels.png?generation=1560886969685751\&alt=media)

For an image showing the pin names of the XBee socket on M2, click [here.](https://docs.macchina.cc/product-documentation/m2-docs/pin-mapping#xbee)

## USB

M2 has a USB connector that can act as either a HOST or DEVICE depending on your code.

M2 uses Native USB port only. To print something to the Serial monitor, you'd need to use this command:

```cpp
SerialUSB.print("Something");
```
