> For the complete documentation index, see [llms.txt](https://docs.macchina.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.macchina.cc/product-documentation/m2-docs/detailed-reference/communication.md).

# 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)

![](/files/-Lhg6DP-eGIoLUpnRAeW)

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:

![](/files/-Lhg6DP12R4TTBGsP1xv)

For an image showing the pin names of the XBee socket on M2, click [here.](/product-documentation/m2-docs/detailed-reference/pin-mapping.md#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");
```
