A Maker in the Making – my first steps with Intel® Galileo

Update: a German translation can be found here – Eine Entwicklerin beim Entwickeln: meine ersten Schritte mit dem Intel Galileo Board. (how cool is this!!!)

I am one of the lucky people who managed to have access to an Intel® Galileo board a month ago. The Intel Galileo board is an Arduino certified board using Intel Quark Technology. At the beginning I was very lost, but now I’m borderline obsessed with it.  I find the activity of connecting things and making them work together very relaxing, and it reminded me those childhood moments where I disassembled the stereo, the blender, the talking doll and other articles to see how they worked inside. The best part here is the almost immediate reward of seeing something blink or move so easily. So if you are interested in my journey, keep reading for a report on my first steps.

What will I make?

What will I make?

The first step is to download the Intel Galileo® Arduino SW. It is a prepared version of the Arduino development environment with the image for working with the Intel Galileo board already installed. There are versions for Windows, Linux and MacOS.  The Getting Started document guides you through recognizing, connecting and updating the firmware in your board, so I’m not going to repeat here. There are tons of examples, but the first one you are instructed to try is the Blink example.

Accessing the Blink example

Accessing the Blink example

If you are a newbie like me, the next question would be: great, but now, how do I stop it? Short answer: you can’t. I mean, not through programming. You can always unplug the power (but first disconnect the USB!!! I’m not sure why but the documentation says so 🙂 ).

Update: In the German post, Alexander M nicely explains why is it necessary: “Because otherwise the SPI image on the Galileo may be damaged, and in the case of Galileo can be saved only with external hardware Guide Search. Background: The Galileo requires minimal 550mA current for stable operation, which is normally provided via the AC adapter.If this is not (more) connected but the Galileo still connected via USB to the computer, then it tries to power through this USB port to draw. However, since USB is only specified up to 500mA the current can be almost here, in the worst case during a write operation on the SPI image. Then, the write operation is incomplete and the file structures in the image are corrupted.”

Danke schön!

Danke schön!

But what the Arduino is doing is transferring the sketch (the name Arduino uses for a program) created in the development environment to the Linux system running in the board, which will call that sketch in a loop. Curious? Look at the bottom-dark area in the IDE and you can see the log of what was just done:

Uploading sketch log

Uploading sketch log

 So the slightly more elegant way to stop it is actually upload to the board the initial script, which does nothing, so the board stops blinking and goes to a loop of doing nothing.

Do Nothing sketch

Do Nothing sketch

Ok, now I had my Intel Galileo board connected, updated and had successfully run my first sketch! As you can notice, there are two main parts in a sketch: the setup() and the loop(). As the name suggests, in setup() you set your controls, and in the loop() you program what you want the board to do. The controls are usually associating your variable with the correspondent pin connected to the control of the component, and the loop() will read and/or write something in this control. In the case of our Blink example, the sketch declares pin as 13, then during setup, initializes the digital pin as an output:

Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);

Then in the loop(), it alternates the high and low voltages to make the LED blink, with pauses in between:

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second

So what next? Well, that’s where we have to start using our imagination – or if you already have a project, start connecting the components. The board itself, although well prepared for many usages, cannot do much more than blink without components or add-ons. This video covers of what the board has, the chipsets and controllers. There is also extensive documentation and the available datasheet on what is in the board. But they are mostly controllers, so I needed some component to play with. My first choice was a servo, and after realizing how the proper connect it, I was able to execute the Sweep sample from Arduino:

This video was made today, after my weekend visit to a hardware store to buy proper jumper cables. As I mention on the beginning, I am only starting this and I don’t know yet what will I do (although I have some ideas) and what will I need, so far I’m testing the basics. During my first tests with the servos, having just wires was not very friendly but worked, but working with the motion sensor convinced me I needed proper tools. Now I have jumper wires, alligator clips (especially for conductive fabric), several LEDs, a breadboard and an anti-static band. Previously I had acquired the motion sensor, a LCD and the conductive fabrics. But then today I found out that I actually also need resistors for working with LEDs – told you, newbie! Although a colleague already stated a clarification on my Facebook wall:

Maybe I need more than resistors...

Maybe I need more than resistors…

In my opinion, getting started is super easy. The documentation is great, many samples, and I’m becoming particularly fond of Adafruit (which I cannot not mention the fact that is owned by a women, Limor Fried). Every component has links for the tutorials on how to use it, which is essential for newbies like me.

Limor Fried, Adafruit owner, Entrepreneur of 2012

As I mention before, what the Arduino development environment will do is to upload a sketch that the Linux system will execute indefinitely. So there is a Linux system… here is where things my start to get interesting 🙂 so may next steps will be 1) buy resistors and get the LEDs working, and 2) start investigating the hacking options for the operating system. I already know Yocto is a way to do it, and some people are already using it. I will keep you posted 😉


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s