Friday, March 6, 2015

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.


No comments:

Post a Comment

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