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 program called 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 and run an existing example program on 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 with you.
  3. Install the Arduino IDE on your PC to set up the necessary drivers for the Arduino Uno board. However, we will not be using Arduino IDE 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. 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. Compile led-blink code by typing :
make
  1. Program the Arduino Uno board with the code by typing the following command:
make program PROGRAMMER=arduino PORT=COM3

Please note PROGRAMMER and PORT must be in capital. You should write the same COM port where your Arduino uno is connected on your PC.

  1. LED connected to PIN13 of your Arduino Uno board should start 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 implementation of led-blink example in detail by referring to Tutorial-3

Home <<Prev 2 Next>>