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.

So let's get this tutorial underway...

The first thing you'll want to do if you haven't already is download the Arduino software . The next thing you'll want to do is download the latest version of the chibiArduino software . With those out of the way, the next steps are OS specific:

 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.

win1

  • 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.

win10

 

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.

ubuntu1

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

ubuntu2

  • 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.

ubuntu5

 

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: 

macosx1

  • 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.

macosx4

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”.

simple5

  •  Select the board. Go to the “Tools/Board” menu and select “Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ATMega328”.

simple3


  • Select the serial port. Plug the USB connector into the Freakduino board and select the serial port that it’s connected to.

simple4

  • Click on the “Upload” icon. The code should compile and start uploading. You’ll also see the serial port’s TX and RX LEDs blinking on the Freakduino board. 

win7

Congratulations! You just uploaded your code to the Freakduino board. You should now be the proud owner of a blinking LED :)