Book Image

Intel Galileo Blueprints

By : Marco Schwartz
Book Image

Intel Galileo Blueprints

By: Marco Schwartz

Overview of this book

Table of Contents (19 chapters)
Intel Galileo Blueprints
About the Author
About the Reviewers
Free Chapter
Setting Up the Galileo Board and the Development Environment

Logging your data in the cloud

As discussed, we will first log the data in the cloud. Here, we will use the same hardware and software configurations that we used in the previous chapter.

To log data in the cloud, we will use a service called is a simple publishing and subscribing platform created for machines, gadgets, and any form of computer. There's no sign up or set up required so you can use it instantly.


Here is the link to

We will use the following code. Let's examine it first so that you can understand it easily:

  1. We create a new XDK project first.

  2. Then, we include the following libraries, which are used to communicate with the pins of the Galileo board:

    var mraa = require("mraa");
    var util = require('util');
    var request = require('request');
  3. We need to set the analog pins and set their resolution to 12 bits:

    var light_sensor_pin = new mraa.Aio(0);
    var temp_sensor_pin = new mraa.Aio(1);