Showing posts with label Intel Galileo. Show all posts
Showing posts with label Intel Galileo. Show all posts

Friday, March 6, 2015

Galileo with bigger linux image

Galileo is capable of running two kinds of images (operating system).

  • Small Linux for SPI Flash
  • Full-featured Linux for SD card

There is a fundamental difference. Galileo has an on-board flash memory of size 8Mb, limited amount of space to store its Linux kernel (as well as sketch). The small linux image only allows execution of Arduino sketches. It should be noted that the current firmware will not store sketch in the flash, so it will be lost on power cycle.

As such, the default Linux image is limited in terms of extra features. Fortunately Intel supplies Board Support package, which allows to include everything needed to rebuild the Linux image using Yocto.

But with an SD card, we can boot the Galileo with a bigger Linux image, which provides access to the following: 

  • WiFi drivers – The Galileo supports Intel-chipset WiFi cards with these drivers. Plug them in, and they should be recognized immediately.
  • Python – Python is our favorite when it comes to scripting languages. With Python you can easily post to Twitter, check for unread emails, and perform all sorts of other activities.
  • Node.js – Node.js is a popular JavaScript-based scripting language. A good alternative to Python, if you’re more comfortable with JS.
  • SSH – Secure Shell (SSH) is a very useful network tool that allows you to log into and control a device remotely. With SSH running on your network-connected Galileo, and remotely control the board from any device on the network.
  • openCV – OpenCV is an open-source computer vision application. You can plug a USB webcam into the Galileo’s USB host port, and use OpenCV to track and recognize objects.
  • V4L2Video4Linux2 is a video record and play utility for Linux. You’ll need a USB webcam attached to your Galileo to make use of this.

To boot the Galileo off the bigger Linux image, you’ll need an SD card that is at least 1GB (but less than 32GB). You’ll also need to download the bigger image from Intel’s Drivers page. The file is about 48 MB.

Download the linux image, extract it and copy the contents to your SD card.

Plug in the µSD card and then power it up. The first boot may take a little longer than average.

 

Connecting to Galileo via linux console



  • I would prefer to use ssh to login into Galileo. For that you need to connect your galileo as well as your host machine to the same network.
    • Get the ip address of Galileo using nmap/arp-scan tools in linux.
    • Once you get the ip address you can do ssh.
    • ssh <username>@<ip-address-of-galileo>
      
  • If you have serial console cable, you will be able to see everything including boot sequence.
  • There are many ways. Check this out.


Note:

  • The console UART port is different in Gen1 and Gen2. Please check this link.


Useful links: 

Galileo intial setup to run Arduino sketches

Powering the Galileo


Gen 1: 


  • The Galileo Gen1 should be powered through the barrel jack, using a regulated 5V DC power supply. 
  • After plug-in, just wait for 2 green LEDs to light up (ON and USB).
  • Connect the micro-USB cable to the Intel® Galileo.
  • Connect the other end to your computer.

Gen 2: 


  • The Galileo Gen2 should be powered through the barrel jack, using a 7-15V DC power supply.
  • After plug-in, just wait for 2 green LEDs to light up (ON and USB).
  • Connect the micro-USB cable to the Intel® Galileo.
  • Connect the other end to your computer.



Run the sketch (for linux)


IDE download and setup

  • Download the ide from here and extract the tar.gz file.
  • Go to extracted directory and run the arduino file
  • Open a terminal and run
  • ./arduino
    
  •  If everything is successful, Arduino IDE will be launched (you might need to install java as well to your host machine).


  • Power up the galileo, attach it to the host machine using micro-USB cable.
  • Open a terminal and type
  • ls /dev/ttyACM*
    
  • In IDE, click on Tools menu, select the board (Gen1, Gen2, Edison..) and serial port like /dev/ttyACM0 or /dev/ttyACM1.


  • If the serial port is disabled, you need to give some permission. So type
  • sudo chmod a+rw /dev/ttyACM*
    

Updating the firmware

Before trying to upload any sketch, first you must update the firmware.
  • To update the board firmware go to Help > Firmware Update. Then click Yes to proceed.
  • Make sure you don’t unplug either power or USB from the Galileo. The update procedure will take about five minutes.




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.


  • Make sure the Serial Port and Board selections are still correct. 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.


Intel Galileo Getting started


Intel Galileo is the first Arduino-certified development board based on Intel x86 architecture designed to be hardware and software pin-compatible with Arduino shields designed for the Arduino Uno R3. Digital pins, Analog inputs, the power header, ICSP header, and the UART port pins are all in the same locations as on the Arduino Uno R3. Galileo is a microcontroller board based on the Intel® Quark SoC X1000 Application Processor, a 32-bit Intel Pentium-class system on a chip (datasheet). Galileo has been designed for the makers, students, educators and DIY electronics enthusiasts.


Galileo Gen1
Galileo Gen2

Intel Galileo features the Intel Quark SoC X1000, 32-bit processor can run at up to 400MHz, and it has 512 KB SRAM built-in. The Galileo board supports the Quark with a wide range of external peripherals.

Galileo has 8MB Flash (to store firmware as well as sketch), an 11KB EEPROM (non-volatile memory), and a µSD slot (which supports up to 32GB). In addition to the memory, contains all sorts of peripherals: 10/100Mb Ethernet, USB 2.0 host and client ports, an RS-232 port, and a mini PCI Express (mPCIE) slot.

The Arduino pins – including six analog inputs, SPI, I2C, UART, and PWM outputs – are all exactly placed where an experienced Arduino user would expect them to be.

Galileo is designed to support shields that operate at either 3.3V or 5V. The core operating voltage of Galileo is 3.3V. However, a jumper on the board enables voltage translation to 5V at the I/O pins. This provides support for 5V Uno shields and is the default behavior. By switching the jumper position, the voltage translation can be disabled to provide 3.3V operation at the I/O pins.

Intel has developed an IDE which is exactly similar to Arduino Software Development Environment (IDE), write the sketch in your host machine, compile and transfer the binary to galileo over usb client port.



Useful links:



Fun with RGB LED

People often need home lighting control in their lives. These individuals can easily find relevant products which often use different meth...