Get Started With Axiom Board

To Start Using the Axiom Board you need to follow 3 easy steps: Basic Setup, Flash MicroSD Card and Insert & Power Up.

STEP 1

BASIC SETUP

The first step will be collecting all the accessories to set up the AXIOM Board. This allows you to assemble the minimum amount of items to make the AXIOM Board working well. Below you’ll see the list of accessories you need.

STEP 2

FLASH THE MICRO SD CARD

The second step will guide you through the creation of a bootable Micro SD card for the AXIOM Board, starting from a precompiled image file containing the AXIOM OS.

First, simply unzip the image and write it on the Micro SD card using the dd tool for UNIX/MAC users or Win32DiskImager for Windows users. It is not possible to create a bootable Micro SD card with drag and drop.

SD CARD REQUIREMENTS

Please consider that the size of a Micro SD card must be at least 16GB; Micro SD memory cards with a higher capacity may be used, and the Linux root partition will be expanded to the full SD card size during the first boot.

STEP BY STEP GUIDE

  • Download the official Micro SD image from here. To check out all the versions please follow this link.
  • Extract the .img file from the .tar.bz2 file you downloaded into any folder (this path will be referred to as <img_file_path> in the guide).
  • Follow the instructions below for the OS you have in your computer:

STEP 3

INSERT MICRO SD AND POWER UP

In the third step we’re gonna plug the Display, the keyboard and mouse, the ethernet cable and the MicroSD to the AXIOM Board. Once done that we just need to Power Up the Board and in a matter of seconds the OS will show up right to the Desktop!

BASIC TUTORIAL

BLINKING LED

In this tutorial we’re going to learn how to write, upload and execute your first Arduino-compatible sketch on AXIOM Board.

In nerd’s jargon this is usually referred as “Hello World”, aka the first basic command you give to a device. Our “Hello World” will be a blinking led, simple as it sounds. So, let’s get our hands dirty.

STEP BY STEP GUIDE

In AXIOM OS desktop:

  1. Open the Arduino IDE, you can find it in: applications>programming>Arduino IDE;
  2. Select the right Board from Tools>Board>AXIOM AVR8 IP;
  3. IF you want just try the code go to: Files>Examples>01.Basics>Blink;
  4. Then Verify and Upload the Sketch;
  5. Otherwise IF you want some advantage knowledge follow all the steps below to understand the code better.

UNDERSTANDING THE CODE

Every Arduino sketch contains 2 parts that are absolutely needed:

void setup()

This comes at the beginning, insert here environment values

void loop()

Here you put your main code, to be executed repeatedly. The code must be contained between {}

Let’s insert the proper code now:
First we’re gonna name our pin, that is purely for future convenience. Since we got our LED connected to pin 13, we call pin 13 led

int led = 13;

then we configure our pin as an output

void setup() {
pinMode(led, OUTPUT);}

Ok, now the real code!
Let’s turn on the LED, to do so we set the pin led to HIGH state:

digitalWrite(led, HIGH);
void loop() {
digitalWrite(led, HIGH);   }

The complete sketch will look like this:

int led = 13;
void setup() {
pinMode(led, OUTPUT);}
void loop() {
digitalWrite(led, HIGH);   }

To execute this command, let’s upload this, to do so:

  • It’s a good practice to give your code a second look, just to spot some typos or logic errors;
  • When you’re sure everything is fine, click on Verify. This will check your code, or Sketch, for errors;
  • If everything is fine, cross your fingers and hit upload;
  • After few seconds, when your code has done being loaded, magic will happen. The LED will lit!

Ok, now that you’re initiated to Pin state mode, let’s push things forward.

To turn it off, just set his value to off:

digitalWrite(led, LOW);

The complete sketch will look like this:

int led = 13;
void setup() {
pinMode(led, OUTPUT);}
void loop() {
digitalWrite(led, LOW);   }

Ok, now we know how to turn the LED on and off. What about using these 2 states combined to have a blinking LED? The logic behind this is that we turn the state HIGH, then we keep this state for some time and then we set it to LOW, keep this some time again and restart. To ensure that our led blinks and doesn’t just lit on and off, we set these logical states into a loop, that will repeat these actions forever (or, until we stop it).

void loop() {
digitalWrite(led, HIGH);   
Turn the LED on
delay(1000);    
And after a second
digitalWrite(led, LOW);   
The led is turned off
delay(1000);        }

Then wait another second, and restart the loop, so the LED will turn on again.

Our final sketch

int led = 13;
void setup() {
pinMode(led, OUTPUT);}
void loop() {
digitalWrite(led, HIGH);   
delay(1000);    
digitalWrite(led, LOW);  
delay(1000);      
}

Verify and upload this sketch as you did before and enjoy your blinking LED.