With the latest release of chibiArduino, it's probably best to have a short tutorial on installing things. The library installation is a standard library installation, however I've gotten a lot of questions in the past about library installation. I figure it's probably best to take care of it in this tutorial. Also, there's an additional component which is optional if you're using the Freakduino, but you're really going to want if you're using one of the other boards I'll be releasing soon or rolling your own board. This is a boards.txt file which is a board description file. Inside the board description, it's possible to set #defines that allow the chibiArduino stack to identify the type of board being used and adapt itself accordingly. This allows the chibiArduino stack to be more flexible in accomodating different board configurations without having to involve the user in too much other than the board selection menu.

Windows

Copy the chibiArduino zip file and then go to the <ARDUINO_ROOT>/libraries directory. Inside that directory, create a folder called "chibiArduino" or whatever name you feel is appropriate. Unzip the contents of the file inside that directory.

Now we're going to check to make sure everything got installed properly. Restart your Arduino IDE. This is important because the software scans the core directories only on startup so if you don't restart, it won't find any changes that you've made. Once you've restarted the IDE, go to the Files/Examples menu item and check to make sure you can see the chibiArduino directory. If you can see it, that means the library has been installed properly.

Linux

For the Linux installation, I'll be using Ubuntu as reference. It should be fairly straightforward on any other flavor of Linux as well.

The first thing is to install the Arduino IDE and associated dependencies.

Go to the <ARDUINO_ROOT>/libraries directory and create a directory called chibiArduino.

The chibiArduino library zip file should be copied into that directory.

Now let's check to make sure everything got installed properly. Open your Arduino IDE or restart your Arduino IDE if it's already open. The IDE scans the directories on startup so if you don't start fresh, then the changes won't be seen. Go into the File/Examples menu and check to make sure you can see the chibiArduino Examples. If you can see it, then the chibiArduino library was installed properly.

Mac OSX

Let's install the chibiArduino library for Mac OSX. This one's slightly tricky because of one complication. We're going to start with the chibiArduino library installation. Go to the /documents/Arduino/ directory and create a folder called "libraries". Then go into that directory and create a folder called "chibiArduino". Copy the chibiArduino library zip file into that directory and unzip it. The folder structure should look like this:

Now let's check to make sure everything got installed properly. Open up the Arduino IDE or restart the IDE if it's already open. This is important because the software scans the directories only on startup. If you don't have a fresh start, the changes you've made won't get seen. Once the software is up, go to the File/Examples menu and check to see that you can see the chibiArduino examples. If you can see this, then the chibiArduino library was installed properly.

Uploading Code to the Freakduino Board

Uploading code to the Freakduino board should be fairly straightforward.

Open the IDE and add code. Weâre going to take a shortcut and open up one of the default examples that comes with the Arduino software. Go to the âFile/Examples/Basicsâ menu and select âBlinkâ.

Followed instructions for Mac, above. The board and example file show up as they should, after installation as above.

(chibiArduino_v1.00, from ZIP file.)

But compiling fails as follows ...Blink.ino:10:21: error: Arduino.h: No such file or directory Blink.ino: In function 'void setup()': Blink:15: error: 'OUTPUT' was not declared in this scope Blink:15: error: 'pinMode' was not declared in this scope Blink.ino: In function 'void loop()': Blink:20: error: 'HIGH' was not declared in this scope Blink:20: error: 'digitalWrite' was not declared in this scope Blink:21: error: 'delay' was not declared in this scope Blink:22: error: 'LOW' was not declared in this scope

This only happens with the Freaklabs board selected, in the Board menu, as depicted in your instructional image, above.

Any clues? Thanks.

report abuse

vote down

vote up

Votes: +0

...written by Akiba,
June 29, 2013

Sorry about that. The original instructions to install the boards.txt file were incorrect. The basic error was that if you create a new folder in the /hardware/ directory, you need to have all the associated library files in there as well as the boards.txt file. It's too much of a burden on the user to do that in my opinion, so I've pulled that part of the installation. It's not so critical for the freakduino and you can just use the standard built-in board description "Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ATMega328" to download to the board. For future board releases, I'm going to put together a way to identify the board so that the software can configure itself based on board type.