O'Reilly logo

Intel Galileo Essentials by Richard Grimmett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enabling an XBee Interface in the IDE

Let's first set up the IDE for the XBee that will be connected to the Galileo. Once you have connected the shield to the Galileo, simply connect the Galileo with the USB cable to your host computers. Bring up the IDE and then type in the following code into the sketch window:

Enabling an XBee Interface in the IDE

Here is an explanation of this set of code:

  • This set of code initializes the serial port on the Galileo, so you can receive via the serial interface:
    TTYUARTClass* gSerialStdPtr = &Serial; // Galileo, /dev/ttyGSO, Tx pin
    TTYUARTClass* gSerialTwoPtr = &Serial1; // Galileo, /dev/ttySO, Rx pin
    bool gGalileo = true;
    bool qData;
    int led = 13;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required