Jan 12, 2017

Android on Edison!



It's been a while since I've published anything to this blog and also since I've played with the Edison.
Part of the reason I stayed away from the Edison is because when I first heard about it at the Maker Fair in NYC from an Intel Rep giving a presentation, he went into great detail about how many cloud based services would be embedded and included with the Edison.
I recall him saying that is was perhaps the best value of the edison. In any event that never came to fruition. And all of the cool whizbang cloud peices never apeared. In fact I eventually came across this:
https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics

Which goes on to say:
"NOTICE: Intel® Cloud Analytics have been discontinued. Please visit the Intel® Edison Module homepage for alternative solutions."

 Any how..... I came across a bit of info that said that Google was now developing an IoT program within android and the possible hardware includes Raspberry Pi and the EDISON!!

This has given me reason to dust it off and give it a go! Updates to follow!

Feb 28, 2016

Reference and Material Links for all Posts

Reference and Material Links for all Posts

IDE Downloads: Intel XDK and Eclipse

SparkFun GPIO Block Product Page: (link here)
Webserver Example Code from Intel: (link here)
Putty Download: here

WiFi Configuration Article from Intel:
https://software.intel.com/en-us/connecting-your-intel-edison-board-using-wifi

Hardware Guide from Intel: Intel Download 

Using the GPIO Block to make an LED Blink: here
Article about how everything in Linux is a file: everything in linux is a file


Feb 25, 2016

Let's Blink some LEDs!!

HELLO WORLD!!!

Here is my current hardware hookup pictured above, pretty simple.
It's the GPIO Block with female headers, 2 Jumpers to a small solderless breadboard, a resistor and an LED. (I don't think this needs a schematic or diagram but if anyone wants one just ask and I will update this post).

Here is where it gets a little funny for me... we have basically a computer running Linux, and some GPIO...
How do we access these GPIO?
My previous work with microcontrollers would dictate writing a program, or directly writing to a given space in memory that would effect the state of the GPIO in question.

I know there are a million ways to skin a cat, but for right now all I want to do is blink an LED to validate my hardware hookup and also to gain some more knowledge about how one can do so with the Edison.

While researching I came across some pretty simple steps to do just that here.
Here are the broad strokes that I took along with some explanation about the commands.

We are working within the Operating System Linux, and if you didn't know...everything in linux is a file.

For our purposes this even includes the state of the GPIO... that is interesting... from that understanding what we can basically say is if you create / edit / alter the value of a specific file this will effect the GPIO.

Ok enough theory, let's get to it! Explanations / elaborations after the posted code:
From the terminal command line:

cd /sys/class/gpio
echo 14 > export
cd gpio14
echo out > direction
echo 1 > value





This code above does the following (as far as GPIO Hardware):
Changes GPIO 14 into an output
Makes GPIO 14 high

(I'd be happy to go into more detail about the commands themselves, perhaps in another post --> Eventual Link)

If you have an Edison and some form of breakout to access GPIO14, and you have executed the above commands, then you should be able to use a multi-meter to read a "high"  value on GPIO14. This may be 1.8V or 3.3V depending on your hardware.

In my particular case with the hardware I have hooked up (picture at top of post) this is what I get as a result:


As you can see the LED is now lit :D


The important part is that you've now crossed from "Inside the box" to "Outside the box", box in this case being a linux machine on WiFi ;)

This is exciting... it may just be a reading of 1.8V on a meter, or a lit LED at the moment. But truly this can be anything that you can think of.. Unlocking a door, Turning on lights...etc.

Some general background context about what we've just done:
  • GPIO means General Purpose Input Output --> These connections to the Edison or pins as I will reference them going forward, can be either an Input or an Output.
  • Not all pins are created equal --> Some pins have special functions or enhanced features that not every pin on the Edison can do, for now we are sticking with the most basic functions of the most basic type of GPIO or pin on the Edison. Just for reference; some of the "enhanced features" that IO pins (or groupings of pins) have on the Edison are: PWM, USB, UART, SPI, I2C. We'll be getting to those in time.
     
  • "Hello World" is a term that's used to describe the first program you'll write in a programming language. Usually it means having "Hello World" displayed on the screen. In the microcontroller world, the equivalent is blinking an LED.
Where shall I go from here?? Some thoughts (I'll add links to posts as I complete these ideas):
  • Making this Linux machine a webserver
  • Controlling LEDs from a web page 
  • Reading inputs of pins
  • Having LED output be based on results of other inputs

Ok that's it for the moment... Stay tuned for more... Comments / Requests will be acknowledged.


GPIO Now Accessible!!

Well at long last I received the small parts I was waiting on... almost all of them.
I have yet to receive pin headers but went ahead with some female pin headers that I found along with the jumpers I did receive.


As previously mentioned I am using the SparkFun GPIO Block.
Here are some pictures from soldering the female pin headers on the GPIO Block:













(Sorry about the layout of the pics... the built-in WYSIWYG editor of blogger is annoying but I promised myself I wouldn't get hung up on that while documenting this process.)

Anyway as you can see I have the female headers all soldered up and now the GPIO of the Edison is at our disposal!

Next post will be continuing our connections to this newly available hardware!!

Feb 12, 2016

On Installing Ubilinux...

(throat clearing)...
Oh wait it's done!!




Yeah, they boldly tell you you can brick your Edison in the process of doing this (installing Ubilinux).

What they should tell you is that it takes less than 5 minutes and includes a cup of coffee ;)




No Hardware Blues....

I'm going to have to wait a little bit to blink the LED.
I have no small parts like headers or jumper wires to make use of my breadboards.

I've ordered them though!

Meanwhile, the next step is to blink the LED via webpage served off of the Edison; why not begin that part now?

Then I ran across info that says Ubilinux (Debian) is better that Yocto. More Packages, Larger Community, OS has Fuller Feature Set...

So I'll do that, because I'm sure Ubilinux will have lots of options for webservers .

Off to it!


Feb 11, 2016

Ok;enough... It's time to get serious

Today I will blink the LED

Somethings I need to understand about the Edison first:
a-More about it's internal workings; when first learning about electronics I learned that you can't use an x86 platform running a full OS to control pin specific actions directly with discrete timing... things like stepper motors, servos...etc. I learned you have to use a microcontroller.

So far from what I can see about the Edison is it has a lot of labeled GPIO like a microcontroller but so far in interacting it's basically a full blown linux machine. I know so far there are commands to control the direction and status of a pin... but these are via command line so no discernible way to know how many milliseconds between when I execute that command and when the LED will light up... at least not that I can see yet.

I've seen the most examples so far with the Edison hooked up to an Arduino... This again leads me back to the conclusion that the Edison either needs a microcontroller attached to it, or that the Edison already is a linux box with a microcontroller attached to it (my guess is either via USB, SPI or something similar), and if my assumption is correct then I'd think they also share direct access to a bank of high-speed memory and a counter as well.

Anyway... I've just downloaded the: "Intel® Edison Compute Module; Hardware Guide, Jan 2015"
It's a 46 Page PDF written by Intel. Intel Download .

I'll find out my answers shortly and get this done!