Problème de compilation

Bonjour :slight_smile:

Voila, pour mes premiers pas avec l'arduino , je tente de faire ce tuto :
(voir post suivant)

Mon soucis est que dès que je tente de compiler, j'obtiens pas mal d'erreur, mais étant nouveau, je ne vois pas trop d'où viens le problème, voisi les message en question :

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:29: error: variable or field 'WiiChuck_beginWithPowerPins' declared void

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:29: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:29: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h: In function 'void WiiChuck_beginWithPower()':

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:42: error: 'PC3' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:42: error: 'PC2' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:42: error: 'WiiChuck_beginWithPowerPins' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h: At global scope:

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:46: error: variable or field 'WiiChuck_sendCmd' declared void

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:46: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:46: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:46: error: 'cmd' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:46: error: expected primary-expression before 'int'

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:57: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:57: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:57: error: 'resp' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:57: error: 'byte' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:57: error: initializer expression list treated as compound expression

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build15522.tmp\/WiiChuck_funcs.h:58: error: expected ',' or ';' before '{' token

Sauriez vous me venir en aide ?

Merci :slight_smile:

  • l0l0 -

Voici le tutoriel en question : http://www.tinker.it/en/Tutorials/WiiNunchuck

Erreur courante, il faut rajouter cette ligne en début du fichier .h :

#include <WProgram.h>

Hey, merci !! :slight_smile:

Ajouter cette ligne m'a supprimé pas mal d'erreur, mais il en subsiste 2, les voici :

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build23330.tmp\/WiiChuck_funcs.h: In function 'void WiiChuck_beginWithPower()':

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build23330.tmp\/WiiChuck_funcs.h:42: error: 'PC3' was not declared in this scope

C:\DOCUME~1\LOLO-L~1\LOCALS~1\Temp\build23330.tmp\/WiiChuck_funcs.h:42: error: 'PC2' was not declared in this scope

J'ai résolu le problème en remplaçant :

WiiChuck_beginWithPowerPins( PC3, PC2 );

Par :

WiiChuck_beginWithPowerPins( 1, 2 );

Je ne sais pas si c'est la bonne méthode, il y a peut être quelque chose d'autre à faire, j'attends votre confirmation :wink:

Toi, tu utilises le dernier Arduino-0017 non ? :slight_smile:

C'est une version très mauvaise à mon goût, je suis resté en 0013

Oui, j'utilise la 0017, je me suis dit qu'elle étais mieux vu qu'elle est plus récente ^^

Donc vaudrais mieux que je retourne à la 0013 ?

C'est mon avis personnel, oui. Pas forcément la 0013 mais la 0016.