Programmer le CrcDuino

Cette page présente comment configurer sur un ordinateur l’environnement de programmation requis pour programmer une carte électronique CrcDuino:

  • Mise en place d’Arduino IDE;

  • Connecter la carte à Arduino IDE;

  • Installer CrcLib pour Arduino IDE.

View the english version of this page.

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!

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

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.

 

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 latest CrcLib .zip file from the following webpage:

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

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

10. Close and restart Arduino IDE.

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

Articles liés