Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Motion Sensing with Intel® Edison

16 Sep 2015 1  
Motion Sensing with Intel® Edison

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Get access to the new Intel® IoT Developer Kit, a complete hardware and software solution that allows developers to create exciting new solutions with the Intel® Galileo and Intel® Edison boards. Visit the Intel® Developer Zone for IoT.

First, I would like to thank Intel for sending me an Intel® Edison as I was curious about this epic piece of hardware.

Intel Edison Size Comparison

I tried simple programs on Intel Edison like controlling an LED through a node.js app(a simple one) & was wondering what if I could make something using the motion sensing device "Leap Motion" (Got a developer kit when it was in alpha stage)

Finally I could create a simple program to trigger an LED bulb by just waving my hand over the Leap Motion sensor.

Leap Motion Controller

LeapMotion — IR Lights :)

Introduction

In this project I’m connecting the Leap Motion through USB and sending data to Intel Edison through a Processing sketch.

The application running on Intel Edison, reads the data and checks whether the users hand is over the Leap Motion & lights an LED. (sounds really simple right?)

So let’s get started with our project!

I’ll assume that you have successfully flashed your Edison with the latest image. if not please check out the official guide from intel.

Step 1: (Connecting things)

Devices connected!

First you need to power up the edison. in order to do so you can select a convenient way stated below, (I’m referring the Intel Edison with Arduino expansion board)

  1. Powering via DC power supply.
  2. Powering via USB Port. (how to do that? )

from the above options I prefer using the 2nd option.

if we power the Edison via DC power supply, still you need to connect the USB cable as we are communicating with the board through serial communication. So it’s easy to power the edison via the USB port.(check pics below)

Then you need to simply plugin your Leap Motion Controller.(ahh make sure you have installed the Leap Motion software)

Step 2 : (connecting the bulb to edison)

Connect the LED to Digital 8 pin & GND pin

Just connect an LED to the Digital output pin 8 & the other to GND.

Step 3: Uploading Arduino Sketch)

Make sure you have installed the Arduino IDE Designed for Intel Edison. Select the correct board from tools -> board -> Intel Edison.

and the correct port should be also selected from tools -> Port

Usually the port in which the Intel Edison is connected is like/dev/cu.usbmodemxxxx

After configuring the above settings upload the following code to Intel Edison. If you have successfully followed the above steps the Arduino IDE will show "Transfer complete".

Step 4: (Executing the Processing sketch)

You need to have Processing installed on your pc. then execute the following sketch. just one more thing to remember… in the following code, we are sending data to the serial port n.

port = new Serial(this, Serial.list()[n] , 115200);

so to figure out the serial port number see the screenshot below.

Step 5 : (Try it out!)

With a wave of a hand now you light a bulb through Intel Edison! Congrats!

see this video..

https://www.youtube.com/watch?v=cvSJuRuahAk

Intel® Developer Zone for IoT

Start inventing today with the Intel® IoT Developer Program which offers knowledge, tools, kits and a community of experts to quickly and easily turn your innovative ideas into IoT Solutions.

Dream it, Build it with the Intel® IoT Developer Kit for Intel® Edison and Intel® Galileo platforms. These kits are versatile, performance-optimized and fully integrated end-to-end IoT solutions supporting a variety of programming environments, tools, security, cloud connectivity and hardware.

For more resources and to learn how the new Intel® IoT Developer Kit v1.0 can help streamline your IoT projects:

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here