This is an old revision of the document!


Arduino for ODROID-GO - Hello World

You will write a code to display “Hello, ODROID-GO” on your ODROID-GO by following this guide.

When you run Arduino IDE at first then you can see the screen like below.

That editor is called sketch, and this is your playground.

The default source code is,

void setup() {
  // put your setup code here, to run once:
 
}
 
void loop() {
  // put your main code here, to run repeatedly:
 
}

There are 2 functions with some comments that lets you know how it performed in the code.
We will use this simple structure.

We're providing a library for Arduino development: odroid_go.h.
That library helps you to control the components on the board such as LCD, a lot of buttons, speaker, etc.
So you should include that library first.

The board isn't ready so that should be initialized. To initialize the board, use GO.begin() function.
And If you want to control the buttons or the speaker on the board, you have to use GO.update() function to apply the changes on them by the code.
But that GO.update() function isn't used in this guide using only LCD to display a simple string.

Okay let's see the code which is reflecting them.

#include <odroid_go.h>
 
void setup() {
  // put your setup code here, to run once:
  GO.begin(); 
}
 
void loop() {
  // put your main code here, to run repeatedly:
 
}

GO.begin() function has to be in setup() function to be started only once.

And the GO instance has not only that 2 core functions but also a lot of helper functions that lets you to control the components on the board.
Now let's use GO.lcd functions to show “Hello, ODROID-GO”.

We will use GO.lcd.print function to show the string.

#include <odroid_go.h>
 
void setup() {
  // put your setup code here, to run once:
  GO.begin();
 
  GO.lcd.print("Hello, ODROID-GO");
}
 
void loop() {
  // put your main code here, to run repeatedly:
 
}

The sketch looks fine but the texts on the LCD will be too small to see.
Let's increase the font size to 2 by using GO.lcd.setTextSize() function.

#include <odroid_go.h>
 
void setup() {
  // put your setup code here, to run once:
  GO.begin();
 
  GO.lcd.setTextSize(2);
  GO.lcd.print("Hello, ODROID-GO");
}
 
void loop() {
  // put your main code here, to run repeatedly:
 
}

You can verify/compile or upload a sketch from the toolbar or Sketch menu.
Also you can use the helpful shortcuts.

  • CTRL-R: Verify and compile.
  • CTRL-U: Upload.

Before upload the binary, you have to select proper port at the Tools - Port menu.

If all the procedure does well, you can see “Hello, ODROID-GO” on your device.