Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

Cette page présente les codes associés au mode d’erreur de CrcLib.

View the english version of this page.

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 .ino file in order to work properly:

What happens when CrcDuino goes into Error mode?

  1. All Digital outputs are forced to LOW.

  2. All PWM outputs are forced to 0.

  3. The CrcDuino board mounted “FAIL” LED lights up.

  4. If the CrcDuino is connected to a computer, a Serial Monitor has been initialized and is opened, the Error description is printed on it.

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

...

Qu’est-ce que c’est ?

La CRClib est équipée de fonctionnalités pour vous aider à résoudre les erreurs de programmation qui ne sont pas détectées par le compilateur les plus fréquentes.

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 requierent que vous utilisiez les fonctions suivantes dans votre fichier .ino:

Que ce passe-t’il lorsque le CRCduino tombe em mode d’erreur ?

  1. Tous les sorties digitales tombent à LOW.

  2. Toutes les sorties PWM sont forcées à 0.

  3. La DEL “FAIL“ du CRCduino s’allume.

  4. Si le CRCduino est connecté à un ordinateur et la console est ouverte, la description du code d’erreur y est affichée.

  5. 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 Pin

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

Error name

Error description

1

Erreur Pin

Error

Pattern

Motif 1

Unsafe Digital

Pin digitale invalide

The given pin was not a safe digital pin

La pin digitale fournie est invalide.

2

Erreur Pin

Error

Pattern

Motif 2

Unsafe Analog

Pin analogue invalide

The given pin was not a safe analog pin

La pin analogue fournie est invalide.

3

Erreur Pin

Error

Pattern

Motif 3

Unsafe

Pin PWM

Pin

invalide

The given pin was not a safe PWM pin

La pin PWM fournie est invalide.

4

Erreur Pin

Error

Pattern

Motif 4

Unsafe

Pin 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 

digitale invalide

La pin fournie n’est ni une pin PWM ni une pin digitale valide

20

Erreur valeur

Motif 4

Valeur digitale invalide

La valeur fournie n'était ni LOW ni HIGH.

30

Erreur Servo

Error

Pattern

Motif 1

Servo

Already InitializedTrying to initialize a servo (PWM pin) which has already been initialized

déjà initialisé

Tentative d’initialisation d’un servo déjà initialisé.

31

Erreur Servo

Error

Pattern

Motif 2

Servo

Not InitializedTrying to use a servo (PWM pin) which has not been initialized

non initialisé

Tentative d’utilisation d’un port PWM qui n’a pas été préalablement initialisé.

32

Erreur Servo

Error

Pattern

Motif 3

Incorrect

Longueurs pulsations Servo

Pulse WidthsThe given servo pulse widths are invalid. minPulseWidth must be less than maxPulseWidth, and both must be greater than

invalides

Les longueurs de pulsation sont invalides. minPulseWidth doit être inférieur à maxPulseWidth, et ils doivent tous deux être supérieurs à 0.

Articles liés

Filter by label (Content by label)
sorttitle
excerptTyperich content
cqllabel in ( "ar-deverminage" , "ar-es_analogique" , "ar-es_mli" , "ar-es_discrete" )