Galileo is an Arduino compatible Microcontroller board. Arduino is an open-source platform used for building electronics projects. A microcontroller is an integrated computer on a chip.
“Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.”
When you set up the dev environment the first program you run is Blinking the LED, hence it is called the Hello World of Electronics. So before learning complex programs let us see how we can blink an LED with Intel Galileo board.
Requirements:
- Intel Galileo
- Power Supply
- An LED
We will be using Arduino IDE for coding. Download the IDE from the software page of Arduino website.
Unzip the application. You don’t need to install it, when you open the application it will look like this.
The programs you write in Arduino are called sketches. There are two functions in a sketch.
- Loop
- Setup
The setup method runs only once and the loop method runs again and again.
The basic sketch of program should look like this:
- void setup()
- {
-
- }
-
- void loop()
- {
-
- }
In the Arduino IDE goto the Board Manager and download Intel Galileo board from the various options provided.
Now from Tools under Board select your Galileo Gen1 or Gen 2. In my case it is Galileo Gen 2.
Also ensure that your Arduino IDE is pointing to the correct serial port. You can always check this from Device Manager.
The Arduino IDE has many examples that we can use, we will run Blink LED example. We will test our Galileo with the Example that you can find under File -> Examples -> Basics -> Blink
Code: -
- void setup() {
-
- pinMode(13, OUTPUT);
- }
-
-
- void loop() {
- digitalWrite(13, HIGH);
- delay(1000);
- digitalWrite(13, LOW);
- delay(1000);
- }
Now hook the LED carefully to pin 13 of the board. Insert cathode in pin 13 and anode in ground pin. The longer leg is cathode and shorter is anode.
Now deploy the code by clicking on deploy button. You will notice the LED blinking on your board.
Read more articles on Arduino: