Tip |
---|
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.
Note |
---|
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 |
Info |
---|
The CrcLib error code functionality require the use of the following CrcLib functions at some point of your |
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.
Info |
---|
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 LOW
or HIGH
.
...
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
...
Qu’est-ce que c’est ?
La CRClib est équipée de fonctionnalités pour vous aider à résoudre les erreurs de programmation les plus fréquentes qui ne sont pas détectées par le compilateur.
Durant l’exécution de votre programme par le CRCduino, la CrcLib surveille le code et tombe en mode d’erreur si une fonction est utilisée incorrectement.
Note |
---|
Il est important de faire la distinction entre les erreurs de compilation de l’IDE Arduino et les codes d’erreur CrcLib. Les erreurs en bas de la fenêtre de l’IDE Arduino vous informe d’erreurs qui sont apparues à la compilation, lorsqu’il souhaitait convertir le programme en instructions pour le micro-contrôleur. Une erreur de compilation indique un problème dans la façon dont vous avez écrit votre code. Les codes d’erreur CrcLib, en revanche, indiquent des problèmes d’utilisation des fonctions fournies par la librairie. |
Info |
---|
Les codes d’erreurs CrcLib requièrent que vous utilisiez les fonctions suivantes dans votre fichier |
Que ce passe-t’il lorsque le CRCduino tombe en mode d’erreur ?
Toutes les sorties numériques tombent à
LOW
.Toutes les sorties PWM sont forcées à
0
.La DEL “FAIL“ du CRCduino s’allume.
Si le CRCduino est connecté à un ordinateur et la console est ouverte, la description du code d’erreur y est affichée.
La DEL NeoPixel s’allume et le « buzzer » joue des sons en fonction des erreurs détaillées plus bas.
Info |
---|
Une seule erreur à la fois peut faire tomber le CRCduino en mode d’erreur. |
Signification des motifs de la Neopixel et du « buzzer »
Les motifs de « buzzer » et Neopixel indiquent l’erreur exacte.
Motif Buzzer | Séquence de sons |
---|---|
Erreur Broche | Aigu - Grave - Aigu - Grave |
Erreur SPARE | Grave - Grave - Grave - Aigu |
Erreur Valeur | Grave - Aigu - Moyen |
Erreur Servo | Aigu - Aigu - Grave - Moyen |
Motif Neopixel | Séquence de couleurs |
---|---|
Motif 1 | Rouge court - Rouge court - Jaune long |
Motif 2 | Magenta court - Cyan court - Magenta court |
Motif 3 | Cyan long - Rouge long |
Motif 4 | Jaune court - Magenta long |
N° erreur | Motif buzzer | Motif Neopixel | Nom d’erreur | Description d’erreur |
---|---|---|---|---|
1 | Erreur Broche | Motif 1 | Broche numérique invalide | La broche numérique fournie est invalide. |
2 | Erreur Broche | Motif 2 | Broche analogique invalide | La broche analogique fournie est invalide. |
3 | Erreur Broche | Motif 3 | Broche PWM invalide | La broche PWM fournie est invalide. |
4 | Erreur Broche | Motif 4 | Broche PWM/numérique invalide | La broche fournie n’est ni une broche PWM ni une broche numérique valide |
20 | Erreur valeur | Motif 4 | Valeur numérique invalide | La valeur fournie n'était ni |
30 | Erreur Servo | Motif 1 | Servo déjà initialisé | Tentative d’initialisation d’un servo déjà initialisé. |
31 | Erreur Servo | Motif 2 | Servo non initialisé | Tentative d’utilisation d’un port PWM qui n’a pas été préalablement initialisé. |
32 | Erreur Servo | Motif 3 | Longueurs pulsations Servo invalides | Les longueurs de pulsation sont invalides. |
Articles liés
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|