Brand New Intel Edison

Just got my new Intel Edison in the mail the other day, I convinced myself to order it to “Investigate” it for a project I am working on, but in reality I just wanted an excuse to buy one (Keep reading I actually bought 2).

 

To get started I just looked it up on the internet.

Above is the video I used to get started.  During the first night I ended up running the wrong linux commands causing my entire OS to get messed up (*note to self: make sure to run rm only on the specific directories you want to run it on, not everything)  This eventually messed up the Edison and I was unable to do anything with the Edison.  Using the instructions on this post (https://communities.intel.com/thread/58226) I was able to re install the OS and get the Edison working again.


Because I did not feel like dealing with switching the 1.8V logic to 3.3V or 5V logic I decided to pick up the arduino breakout board (This being my second Intel Edison).

To test out some basic functionality I hooked up a range finder sensor. I used some code from one of my other projects to get it going.  The code is very generic and can be found all over the internet if you are curious of how to use a range sensor.  (With the code below “Wire.h” should be apparently I cannot figure out how to make it not delete automatically)

#include "Wire.h"
#define trigPin A1
#define echoPin A0

void setup() {
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}

void loop() {

  get_distance(trigPin, echoPin);

  Serial.println(" cm");
  delay(300);

}

void get_distance (int trig, int echo)
{
  long duration, distance;
  digitalWrite(trig, LOW);  
  delayMicroseconds(2); 
  digitalWrite(trig, HIGH);
  delayMicroseconds(10); 
  digitalWrite(trig, LOW);
  duration = pulseIn(echo, HIGH);
  distance = (duration/2) / 29.1;

  if (distance >= 500 || distance <= 0){
    Serial.print("Out of range ");
  } 
  else {
    Serial.print(distance);
  }
  Serial.print(" - ");
  delayMicroseconds(200);
}


I wanted to make sure that I could control the pins from python as well.  So After some research I found this library called Wiring-x86 (http://wiring-x86.readthedocs.org/getting_started.html)

To make my life easier, I just installed nano with “wget http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz && tar xvf nano-2.2.6.tar.gz && cd nano-2.2.6 && ./configure && make && make install” – https://communities.intel.com/thread/55602

Just using the base code from https://github.com/emutex/wiring-x86/tree/master and the code worked fine.  This allowed me to control the LED on pin 13.

To double check all of this, I went to use the Blink example code set provided with the arduino IDE, I had issues at first loading the code, but after I reset the board It worked like a champ.  I am going to investigate why the board didn’t work on the first try with the arduino code, but I have a feeling it may be related to the wiring-x86 library I was using.  But I cannot say for certain yet.

Despite this being a new board to work with, there is a lot of information on the internet about it and how to use it, and the forums seem to be a good place for issues that you run into.

 

My  plan for these guys is to use it on my RC car project that I have been stalling on for over 2 years now.  But I am going to tackle that another day.

 

 

More Reading:

 

http://blog.dimitridiakopoulos.com/2014/09/10/hands-on-intel-edison/

http://jamidwyer.com/blog/node/35

http://fab-lab.eu/edison/