Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This page explains how to set up the programming environment on a computer needed to program a CrcDuino board:

  • Setting up Arduino IDE;

  • Connecting the board to Arduino IDE;

  • Installing CrcLib for Arduino IDE.

The CrcDuino board can easily be programmed using any Integrated Development Environment (IDE) that supports Arduino programming. This wiki only explains in detail how to setup the Arduino IDE because it's the easiest way to go for people that are just getting into micro-controller programming: it is free, easy to use and most importantly, the online support community is huge. The Arduino IDE can be used to program any Arduino board.

The CrcDuino is based on the same components as a Arduino Mega 2560 standard board. Therefore, an Arduino compatible IDE configured for an Arduino Mega 2560 should be able to recognize and interact with a CrcDuino.

Having trouble along the way? The first step is to re-read the instructions listed below. Still not sure? Refer to the Arduino website or use your favorite search engine for more information.

A-Setting up Arduino IDE

1. Download the latest Arduino IDE from the Arduino website. Don't be shy do snoop around the website. There's a lot of useful information on what Arduino is and how you can use it in an endless number of ways!

Do not use the online version of Arduino IDE, else CrcLib won’t be able to run at all.

2. Install it on the computer. Select the "Install USB driver" option if prompted. Any destination folder can be chosen, but we strongly recommend using the default one. The following instructions assume it’s the chosen one.

3. Open the Arduino IDE (for example, by clicking arduino.exe in C:\Program Files (x86)\Arduino, the default install destination folder).

4. It's a good thing to open a Serial monitor when using Arduino IDE. A serial monitor can be used to interact with your Arduino board.

5. The CrcDuino uses the same microcontroller as the Arduino Mega 2560 board. Setup the Arduino IDE to be used with an Arduino Mega 2560 board and make sure the processor used is the ATmega2560 (Mega 2560).

B-Connecting the board to Arduino IDE

Since we installed the Arduino drivers at the same time as the IDE itself, your computer should now recognize the board if you plug it in. If not, the driver can be manually downloaded using the link at the bottom of this page.

6. Select the COM Port through which the computer connected with the board. If there's nothing else plugged in the computer (like in this demo), it should have connected to COM3. Therefore, it's the only one available. The COM port used doesn't matter, but it’s important to choose the one corresponding to the CrcDuino. Bear in mind that it might change from time to time depending on what is plugged into the computer used.

If there’s more than a single COM Port available, make sure to try them all if the first one does not work. Unplugging all other devices from the computer should make it easier.

If the board cannot be connected to un plug it and re-plug it to your computer a couple of times, with a good 10-20seconds between each try. Also, make sure the code itself is not the problem. Try using the basic program available here.

7. Confirm that the connection has been established correctly with the CrcDuino by using the Get Board Info tool. A CrcDuino appears as an Unknown Board.

C-Installing CrcLib for Arduino IDE

A library is a set of files that contains different functions to be used in your program. For the IDE to know what the functions called in the code refer to, it needs to know where they are defined and detailed. With CrcLib, the library needs to be manually installed to the appropriate folder on the coding computer.

6. Download the CrcLib .zip file from Bitbucket, available on this page.

PHOTO

7. Un-ZIP the downloaded .zip file, and drill-down until a folder called CRCLib, as well as folders called CrcDependency_xyz, are shown. Note that depending on the library version used, the exact name of the files might be a little different from the one pictured just below.

8. Identify the Arduino sketchbook location in Arduino IDE by going to File-Preferences, and navigate to that location using Windows File Explorer. Open the Folder called librairies.

9. Copy-paste the CrcLib folder and its dependencies to the librairies folder.

If there’s already previous CrcLib versions (or one of its dependencies beginning wit CrcDependency) in the librairies folder, move them (not copy them) somewhere else before putting the new folders. By moving them somewhere else instead of deleting them, you'll be able to easily use them again in the future if needed. Having multiple copies of the same library will confuse the compiler.

10. Arduino IDE is now all set up to program the CrcDuino using CrcLib functions. When compiling the code (ctrl-R), the IDE recognizes the CrcLib.h file.

Related articles

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.