Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Intel Edison Projects
  • Table Of Contents Toc
  • Feedback & Rating feedback
Intel Edison Projects

Intel Edison Projects

By : Basu
close
close
Intel Edison Projects

Intel Edison Projects

By: Basu

Overview of this book

Change the way you look at embedded electronics with Intel Edison. It is a small computing platform packed with a set of robust features to deliver hands-on performance, durability, and software support. This book is a perfect place to kickstart development and rapid prototyping using Intel Edison. It will start by introducing readers to the Intel Edison board and explaining how to get started with it. You will learn how to build a mini weather station, which will help you to acquire temperature and smoke level and push it to the IoT platform. Then you will see how to build a home automation device and control your appliances using an Android app. Furthermore, we will build a security system using a webcam to detect faces and perform voice recognition. Toward the end, the book will demonstrate how you can build two robots, which will be based on different line sensing sensors and can be controlled by a PC. The book will guide the readers through each and every step of execution of a project, using Intel Edison.
Table of Contents (7 chapters)
close
close

Using Intel Edison to push data by using the MQTT protocol

As previously mentioned, this short section will show users how to push data from Edison to an Android device using the MQTT protocol. The following screenshot depicts the workflow:

Workflow of pushing data from the Edison to the Android application

From the preceding illustration, it is clear that we first obtain readings from the temperature sensor and then use the MQTT broker to push the readings to the Android application.

Firstly, we are going to connect the temperature sensor to Edison. Make a reference of the circuit from Chapter 2, Weather Station (IoT). After it is connected, fire up your editor to write the following Node.js code:

var mraa = require('mraa'); var mqtt = require('mqtt'); var B=4275;

var R0=100000;

var client = mqtt.connect('mqtt://iot.eclipse.org');
function sendData()

{

var tempPin=new mraa.Aio(0);

//Processing...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY