Say hello to programming.

Write your first program

Length 10 minutes

Level Complete beginner

Prerequisite

Let's start with a very basic program made to introduce programming to people: the Hello World program.

We will start by loading the program into your console. Then we will analyse and understand what it does line by line. Finally, we will help you to make your own program :)

The code

Here is the code we will be looking at :D

#include <Gamebuino-Meta.h>

void setup() {
  gb.begin();
}    

void loop() {
  while(!gb.update());
  gb.display.clear();

  // This is where most of the program takes place
  gb.display.print("hello, world");
}

Compile and upload a program

  • 1 - Turn your Gamebuino ON
  • 2 - Plug it in the computer with with a USB cable
  • 3 - In "Tools/Port" select "Arduino/Genuino Zero (Native USB Port)"
  • 4 - Click on "Sketch/Upload" or press "Ctrl + U" to compile and upload the program to the Gamebuino
  • 5 - Compiling will take a few minutes the first time. Stare deeply at your screen to help it compile faster.
  • 6 - The console will reset and launch the new program. It overwrites any current program, but you can keep several programs at the same time on the micro SD card. See Update and install games.

You should get someting like this:

   

Time to celebrate, you just launched your very first program!

Click on the button below to see how it works :)

Hello, World