EXPLORING INTEL GALILEO

The list of official Arduino boards continues to grow, and, continuing with the famous-Italian-person trend, now includes the Galileo. The Galileo is Intel’s toe-dip into the Arduino waters. It features their Quark SoC X1000 – a 32-bit, x86 system-on-a-chip that can run at up to 400MHz with 512 kB of built-in SRAM.
The Galileo board supports the Quark with a wide range of external peripherals. There’s 8MB Flash (to store firmware), 11kB EEPROM, a µSD socket (supports up to 32GB), 10/100Mb Ethernet, USB 2.0 host and device ports, an RS-232 port, and a mini PCI Express (mPCIE) socket. On top of all that, it’s got that same, familiar Arduino pinout we all love (to hate?). The Arduino pins – including six analog inputs, SPI, I2C, UART, and PWM outputs – are all exactly where an Arduino user would expect them to be.

What the Galileo tries to do is meld the ease of Arduino’s hardware manipulation with the power of a Linux operating system. Most sketches written for Arduino Unos, Leonardos, and other boards can be ported directly over to the Galileo. You can still use popular Arduino libraries like SD, Ethernet, WiFi, EEPROM, SPI, and Wire, but you can also make requests of the Linux kernel with system() calls. This gives your Arduino sketch access to powerful utilities like Python, Node.js, OpenCV, and all sorts of fun Linux-y stuff.

Unread-Email-Checker Example Project

We were fortunate enough to receive a couple of early Galileo boards for evaluation, one of which landed in my hands to futz around with. To get a feel for the board, I tried to whip together a quick project that melded a few of the Galileo’s unique features together.

Most of our work communication occurs in emails, but I’m often turned away from my computer, wielding a soldering wand or banging my head against my Pi workstation as those emails pile up. It’s imperative that I stay up-to-date with the latest SparkFun memes and cool robot videos, so a simple unread-email-counter would be great to have permanently installed over my workbench. Sounds like a perfect project for the Galileo!

First, I needed a utility to check how many unread emails I have. Well, I don’t need much of an excuse to whip out some Python, so I did a quick search and found the script below. It logs into our email server with my credentials, checks how many unread emails there are in the inbox, and prints that value.

# pyMailCheck.py – Logs into your gmail and prints the number of unread emails.
# Place this file in the top level of your Galileo’s SD card.

import imaplib # Used to connect to an IMAP4 server.
obj = imaplib.IMAP4_SSL(‘imap.gmail.com’, ‘993’) # Connect to an IMAP4 sever over SSL, port 993
obj.login(‘my_email_address@gmail.com’,’myPassword’) # Identify the client user and password
obj.select() # Select a the ‘INBOX’ mailbox (default parameter)
# Search mailbox no (None) charset, criterion:”UnSeen”. Will return a tuple, grab the second part,
# split each string into a list, and return the length of that list:
print len(obj.search(None,’UnSeen’)[1][0].split())