Reader small image

You're reading from  Intel Galileo Blueprints

Product typeBook
Published inJun 2015
Publisher
ISBN-139781785281426
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
Marco Schwartz
Marco Schwartz
author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz

Right arrow

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 Dweet.io. Dweet.io 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.

Note

Here is the link to Dweet.io:

http://dweet.io/

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);
    light_sensor_pin.setBit(12);
    var temp_sensor_pin = new mraa.Aio(1);
    temp_sensor_pin.setBit...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Intel Galileo Blueprints
Published in: Jun 2015Publisher: ISBN-13: 9781785281426

Author (1)

author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz