Galileo Getting Started Guide

This Tutorial is Retired!

This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.

Contributors: jimblom
Favorited Favorite 4

Uploading Blink

As always, the first program to be uploaded to a board is the "Hello, world" of microcontrollers - Blink.

To open the Blink example, go to the File > Examples > 01.Basics > Blink.

  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);     

// 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

Make sure the Serial Port and Board selections are still correct (check the Updating Firmware page for help). Then click the Upload button.

After the upload completes, you should see a tiny, green LED blinking on and off every second. This LED is connected to pin 13 of the Galileo.


If you're having any trouble uploading code, or even updating the firmware, here are a few of the hiccups we encountered, and how we fixed them.

In general, if you're having any trouble, try rebooting your Galileo (unplug everything, wait a few seconds, plug back in, wait for the boot-up to complete) to see if it fixes it. If that doesn't work, try rebooting your computer. Sometimes the magic reboot fixes everything.

Improper File Name (Mac)

On Mac, if you get an error like this:

alt text

i586-poky-linux-uclibc-g++: error: No such file or directory

There may be a problem with the name of your application. Make sure there are no spaces! For example, if your application is named "Arduino Galileo", rename it to "ArduinoGalileo".

Bad COM Port (Windows)

On Windows, if your upload hangs, eventually producing this error:

line 34: /dev/ttyS78: Read-only file system

Your COM port number may just be too high. You can reassign the COM port by going to the Device Manager, then right-click on your Galileo device and select Properties. Next, go to the Port Settings tab and click Advanced.... In this window, click the COM Port Number drop-down, and assign the Galileo to a COM port that's less than 10.

After you've done that, reboot your computer and try uploading again.

Any other trouble uploading? Contact our tech support team or leave a comment in the discussion thread here, and we'll be happy to help!