Tutorial 2 : Running simple LED Blink Program - sudeshmoreyos/Morey_os-demo-1.0 GitHub Wiki

Home <<Prev 2 Next>>

In this tutorial we will learn how to run an example code named led-blink on an Arduino Board. We are yet learn how to write a code in Morey_os operating system. This tutorial only aims to compile an example program and run on an Arduino Uno hardware.

In this tutorial, we will learn how to run an example program, led-blink, on an Arduino Uno Board. We have not yet covered how to write code in the Morey_os operating system; that will be addressed in later tutorials. The objective of this tutorial is to compile an existing example program and run it on the Arduino Uno hardware.

Pre-Requisites:

  1. Ensure that all essential tools and utilities required for Morey_os are installed. Refer to Tutorial-1 for the same.
  2. You should have an Arduino Uno Board.
  3. Install the Arduino software on your PC to set up the necessary drivers for the Arduino Uno board. However we will not be using Arduino Software anywhere in Morey_os.

The steps to run our first program is as follows :

  1. Connect Arduino Uno to your PC.
  2. Go to Device Manager -> Ports(COM & LPT) and check for COM Port to which Arduino Uno is connected.

As shown above, Arduino Uno is connected to COM3. Similarly check COM Port of your Arduino Uno.

  1. Next open git bash. Assuming that Morey_os is saved in C drive, change directory to C:\Morey_os-demo-1.0\examples\board-examples\arduino-uno\led-blink by typing command :
cd "C:\Morey_os-demo-1.0\examples\board-examples\arduino-uno\led-blink"

git bash-1

  1. Then compile led_blink code by typing :
make
  1. Next step is programming the code into Arduino Uno. This can be done by typing command :
make program PROGRAMMER=arduino PORT=COM3

You should write the same COM port where your Arduino uno is connected on your PC.

  1. Now Led-13 of your Arduino Uno should be blinking. You can also connect an LED to pin A0 of Arduino. Both LEDs will blink together. Congratulations you have implemented your first Morey_os code!

Let us now understand the led-blink example in detail by referring to Tutorial-3

Home <<Prev 2 Next>>