Cette page présente les codes associés au mode d’erreur de CrcLib.
What is it?
CrcLib is equipped with a functionality that helps troubleshooting common programming mistakes that cannot be recognize by the compiler before loading the code into the micro-controller.
As your program is executed by the CrcDuino, CrcLib actively monitors the code execution and falls into Error mode if a CrcLib component is incorrectly used.
CrcLib error codes are not to be mixed up with the Arduino IDE compiling error message buffer. The bottom message window in Arduino IDE tells you what caused a compiling error, when it tried to translate your code into executable instructions for the micro-controller. A compiling error indicates that something is wrong in how you syntactically wrote your code. The CrcLib error functionality indicates
The CrcLib error code functionality require the use of the following CrcLib functions at some point of your .ino
file in order to work properly:
What happens when CrcDuino goes into Error mode?
All Digital outputs are forced to
LOW
.All PWM outputs are forced to
0
.The CrcDuino board mounted “FAIL” LED lights up.
If the CrcDuino is connected to a computer, a Serial Monitor has been initialized and is opened, the Error description is printed on it.
The CrcDuino Neopixel LED flashes and the buzzer buzzes in the pattern specified below, indicating what caused the error.
Only one error cause can trigger the Error mode at a time.
Neopixel and buzzer pattern signification
Combining the Buzzer and Neopixel pattern indicates the nature of the error that triggered the Error Code.
Buzzer pattern ID | Corresponding buzzer note pitch sequence |
---|---|
Pin Error | High - Low - High - Low |
SPARE Error | Low - Low - Low - High |
Value Error | Low - High - Middle |
Servo Error | High - High - Low - Middle |
Neopixel pattern ID | Corresponding Neopixel color sequence |
---|---|
Pattern 1 | Short RED - Short RED - Long YELLOW |
Pattern 2 | Short MAGENTA - Short CYAN - Short MAGENTA |
Pattern 3 | Long CYAN - Long RED |
Pattern 4 | Short YELLOW - Long MAGENTA |
Error ID | Buzzer pattern | Neopixel pattern | Error name | Error description |
---|---|---|---|---|
1 | Pin Error | Pattern 1 | Unsafe Digital Pin | The given pin was not a safe digital pin. |
2 | Pin Error | Pattern 2 | Unsafe Analog Pin | The given pin was not a safe analog pin. |
3 | Pin Error | Pattern 3 | Unsafe PWM Pin | The given pin was not a safe PWM pin. |
4 | Pin Error | Pattern 4 | Unsafe PWM / Digital Pin | The given pin was neither a safe PWM or digital pin. |
10 | SPARE Error | Pattern 1 | SPARE10 | Not used |
11 | SPARE Error | Pattern 2 | SPARE11 | Not used |
12 | SPARE Error | Pattern 3 | SPARE12 | Not used |
20 | Value Error | Pattern 4 | Incorrect Digital Value | The given value was not |
30 | Servo Error | Pattern 1 | Servo Already Initialized | Trying to initialize a servo (PWM pin) which has already been initialized. |
31 | Servo Error | Pattern 2 | Servo Not Initialized | Trying to use a servo (PWM pin) which has not been initialized. |
32 | Servo Error | Pattern 3 | Incorrect Servo Pulse Widths | The given servo pulse widths are invalid. |
Articles liés
-
CrcDuino: détails matériels (Système CrcDuino System) —
Cette page présente les différents composants physiques qui se retrouvent sur une carte électronique CrcDuino. C’est une lecture assez chargée, mais elle en vaut la peine!
Toutes les valeurs de voltage indiquées sont par rapport à la broche
GND
. Celles-ci sont toutes connectées entre elles, alors elles peuvent toutes être utilisées à votre guise. -
CrcLib: accéder aux broches IO (Système CrcDuino System) —
Cette page présente les constantes symboliques définies dans CrcLib en utilisant la directive du pré-processeur
#define
.Broches
-
CrcLib: avertissements d'utilisation (Système CrcDuino System) —
Cette page présente de l’information essentielle à propos de CrcLib.
Règles à suivre
-
Déverminage - Codes d'erreur CrcLib (Système CrcDuino System) —
Cette page présente les codes associés au mode d’erreur de CrcLib.
Qu’est-ce que c’est ?
-
Déverminage - FAQ (Système CrcDuino System) —
Cette page présente les solutions aux problèmes fréquemment rencontrées lors du travail avec le système CrcDuino.
Cliquer sur les situations problématiques ci-dessous pour en apprendre plus sur leur solution.
-
GetAnalogInput() {FR} (Système CrcDuino System) —
Objectif
Obtenir l'état d’une entrée analogique du CRCduino
Quand l’utiliser
-
GetDigitalInput() {FR} (Système CrcDuino System) —
Objectif
Obtenir l'état d’une entrée numérique (DIO) sur le CRCduino.
Quand l’utiliser
-
InitializePwmOutput() {FR} (Système CrcDuino System) —
Objectif
Permet l’utilisation d’une broche PWM en configurant ses paramètres internes.
Quand l’utiliser
-
SetDigitalOutput() {FR} (Système CrcDuino System) —
Objectif
Contrôle une broche numérique(DIG) en mode sortie
Quand l’utiliser
-
SetDigitalPinMode() {FR} (Système CrcDuino System) —
Objectif
Permets d’utiliser les entrées sorties numériques (DIO) en indiquant à la librairie si cette broche doit être une entrée ou une sortie.
Quand l’utiliser?
-
SetPwmOutput() {FR} (Système CrcDuino System) —
Objectif
Contrôler la sortie d’un port PWM
Quand l’utiliser
Add Comment