advertisement
Facebook
X
LinkedIn
WhatsApp
Reddit

Getting started with Intel’s Edison hardware hacking board, pt2

NLast week, we published a very basic intro to setting up a new Intel Edison processor with Arduino compatible expansion board. Edison is best seen as a step up from Raspberry Pi and Arduino style hacking projects – the hardware is a bit more expensive than most maker gear, but it’s a lot more powerful as it features a fully functional x86 processor with built-in WiFi and Bluetooth antenna. So if you’re after something that’s all-in-one, this is it.

You can read part one here.

Now we’re going to finish off the initial set-up and get you started on your first project with Edison.

Step 10

Wait for the program to install

We left you downloading and installing the all-in-one Edison software toolkit from Intel’s website here, so if you haven’t yet done so, let the installer run its course.

Untitled18
It’s a hefty download, so watch your cap.

A new window will pop up, this may happen several times as the download progresses. You’ll need to click “Next” a fair number of times. Once for the Phone Flash Tool, which lets you write firmware to the Edison chip.

Untitled19

Untitled22Step 11

Update system settings

When presented with the option, make sure you update PATH – this just makes it easier to write to Edison from within Windows.

Untitled24

Now you’ll have to install the USB drivers, in exactly the same manner.

Step 12

Unplug the Edison

After the USB drivers have installed, you’ll need to unplug the Edison from your PC when you see this popup box.

 

Untitled32There’s a few more Windows to work your way through to complete the installation, but essentially that’s it. You’re all setup.

Step 13

Checking it’s all working

Now that the software is installed on your PC, you can run a simple test to make sure the Edison board is working. First of all, reattach that USB cable we unplugged in the last step. That will provide both power and a link to program the board directly from your PC.

Step 14

Launch the Arduino IDE

Assuming you’re using Windows, you need to open up the Arduino IDE program that we installed in the last part of the tutorial. Don’t get confused by the terminology – IDE stands for Integrated Development Environment – it just means everything you need to write, compile and upload Arduino code to your Edison board is contained in one simple toolset.

Untitled38
Starting the Arduino IDE from Windows 10.

The Arduino IDE program will now open, and it should give you a blank project with a few sample lines of code, that look like this.

Untitled39

Everything inside the IDE should be setup automatically for your Edison, but you may want to double check that your board has been selected correctly in the Tools section. Note that the Intel Arduino IDE is not the same as the software you install from the Arduino homepage – it’s specially configured for Edison.

Step 14

Some basics about Arduino

Before you go any further, here’s some things you should probably know about the Arduino IDE. You can skip this if you’ve used Arduino before.

Arduino is a brand name for a series of simple controller boards which usually consist of a low power ARM processor and some input/output pins. Arduino is an open hardware design, so anyone can make a board based on the reference plans, and is designed to be easy to program. It’s very versatile: you’ll find Arduinos used for school electronics projects to 3D printer controllers to robot artwork installations and more. Industry uses Arduino as a prototyping platform to test new hardware while hobbiests use it for everything from programmable gate remotes to smarthome controllers.

While the controller itself is a limited piece of hardware, addon boards – known as Shields – can give it powers to control motors, cameras and more.

The programming language for Arduino is very straightforward. It’s essentially a pared down version of C++ that is easy to learn, especially if you’re doing something simple like sending power to a particular pin when a particular event happens (as in, press button, send power to open door.

In Arduino terms, a program is known as a “Sketch”, and once written it needs to be compiled and uploaded to your board. Edison is fully Arduino compatible in that any existing Arduino Sketches should work with Edison, and Arduino shields fit into the same connectors on the physical board without modification.

You can learn more about Arduino here.

Step 15

Testing with a standard Arduino Sketch

The first program anyone runs on a new Arduino board is called Blink, and it simply makes an LED on the board turn on and off to show that everything is working.

Here’s how to do it.

Go to File>Examples>Basics and select Blink.

Untitled44

The Sketch for Blink will load into the main window. It looks like this.

Untitled45
Blink, beloved of Arduino owners everywhere. Some people even get to a second Sketch.

If you’re new to coding, you’ll notice that Blink consists of a few different parts. Anything enclosed between a forward slash and an asterix like this /* and like this */ is known as a “Comment” and is ignored when the Sketch is turned into code that the Arduino can read.

Comments can also be added by inserting a double forward slash at the front – but in this case the comment is closed at the end of that line without waiting for a second set of symbols.

In the example above you can see comments used to introduce the Sketch and explain what it’s for, surrounded by /* and */ as if those symbols are brackets. Single line comments are used to explain what each line of code does. While most programmers won’t comment every line of code like Blink, it’s good practice to use comments so anyone looking at you code can see what it’s for.

Step 16

Verify and upload Blink

For the first test, we’re not going to change anything in Blink, but you should be able to see where the variables are that would let you customise the code. You could, if you wanted to, alter the delay() function to make the light flash faster or slower.

For now, just test that the Sketch is written correctly by clicking the tick in the top right corner. This will verify all is in order and ready for you board.

Now click the arrow next to it.

Untitled46

And hurrah, one of the LEDs on your Edison should begin turning off and on again. Now you’ll want to do something more impressive, and for that you’ll have to wait for part 3.

A version of this feature first appeared on Intel’s IQ blog.

advertisement

About Author

advertisement

Related News

advertisement