Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Intel Galileo Essentials

You're reading from   Intel Galileo Essentials Leverage the power of Intel Galileo to construct amazingly simple, yet impressive projects

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784398903
Length 162 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started with the Galileo FREE CHAPTER 2. Accessing the GPIO Pins 3. Adding Display Functionality 4. Controlling DC Motors 5. Adding Sensors 6. Remote Control 7. Going Further with Galileo 8. Speech Output Index

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:

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;
  • This set of code starts the send and receive process, you'll only use the receive process for this application:

    qData = false; // Initialize on reset
    gSerialStdPtr->begin(9600); // Receiver
    gSerialTwoPtr->begin(9600); // Sender
    waitForUser(5); // Give usr time to open serial terminal
    gSerialStdPtr->println("XBee-Receiver-setup");
    pinMode...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image