voila je viens de créer un robot hexapode, et je souhaite-le contrôler par un wii nunchuck car: il est pas chère ,et on a un accéléromètre a 3 axes, deux boutons et un joystick pour 15 euro!!
j'ai acheté cette adaptateur :http://www.robotshop.com/productinfo.aspx?pc=RB-Dfr-62&lang=fr-CA pour un carte arduino Uno.
pour m'aider dans programmation j'ai télécharger sur ce page http://www.pobot.org/-Capteurs-Wii-.html , une librairie pour le nunchuck et un exemple de programme pour servo ( piéce jointe les fichier).
et là ça bug : je transfère tout dans arduino et je vérifie, j’obtiens un message d'erreur :
In file included from ChuckServoTest.cpp:3:
/WiiChuck.h:33:23: error: WProgram.h: No such file or directory
In file included from ChuckServoTest.cpp:3:
WiiChuck.h:47: error: 'byte' does not name a type
WiiChuck.h:49: error: 'byte' does not name a type
WiiChuck.h:59: error: 'boolean' does not name a type
WiiChuck.h:63: error: 'byte' does not name a type
WiiChuck.h:64: error: 'byte' does not name a type
WiiChuck.h:65: error: 'boolean' does not name a type
WiiChuck.h:66: error: 'boolean' does not name a type
WiiChuck.h:144: error: 'boolean' does not name a type
WiiChuck.h:147: error: 'boolean' does not name a type
WiiChuck.h:152: error: 'boolean' does not name a type
WiiChuck.h:157: error: 'boolean' does not name a type
WiiChuck.h:188: error: 'byte' does not name a type
/WiiChuck.h: In member function 'void WiiChuck::begin()':
WiiChuck.h:71: error: 'cnt' was not declared in this scope
WiiChuck.h:72: error: 'averageCounter' was not declared in this scope
WiiChuck.h:74: error: 'class TwoWire' has no member named 'send'
As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.
WiiChuck.h:75: error: 'class TwoWire' has no member named 'send'
As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.
/WiiChuck.h: In member function 'void WiiChuck::calibrateJoy()':
WiiChuck.h:87: error: 'joyX' was not declared in this scope
WiiChuck.h:88: error: 'joyY' was not declared in this scope
/WiiChuck.h: In member function 'void WiiChuck::update()':
WiiChuck.h:96: error: 'cnt' was not declared in this scope
WiiChuck.h:96: error: 'class TwoWire' has no member named 'receive'
As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.
WiiChuck.h:96: error: '_nunchuk_decode_byte' was not declared in this scope
WiiChuck.h:99: error: 'cnt' was not declared in this scope
WiiChuck.h:100: error: 'lastZ' was not declared in this scope
WiiChuck.h:100: error: 'buttonZ' was not declared in this scope
WiiChuck.h:101: error: 'lastC' was not declared in this scope
WiiChuck.h:101: error: 'buttonC' was not declared in this scope
WiiChuck.h:109: error: 'joyX' was not declared in this scope
WiiChuck.h:110: error: 'joyY' was not declared in this scope
WiiChuck.h:113: error: 'B00000011' was not declared in this scope
WiiChuck.h:118: error: 'B00000001' was not declared in this scope
WiiChuck.h:119: error: 'B00000010' was not declared in this scope
/WiiChuck.h: In member function 'int WiiChuck::readJoyX()':
WiiChuck.h:163: error: 'joyX' was not declared in this scope
/WiiChuck.h: In member function 'int WiiChuck::readJoyY()':
WiiChuck.h:167: error: 'joyY' was not declared in this scope
/WiiChuck.h: In member function 'void WiiChuck::_send_zero()':
WiiChuck.h:197: error: 'class TwoWire' has no member named 'send'
As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.
ChuckServoTest.cpp: In function 'void setup()':
ChuckServoTest.pde:-1: error: 'PC3' was not declared in this scope
ChuckServoTest.pde:-1: error: 'PC2' was not declared in this scope
Donc je me dis qu'il faudrait que je test un autre fichier,
du coup je vais sur ce cette page qui est super : http://blog.oscarliang.net/wii-nunchuck-arduino-tutorial/
et la aussi une erreur que même la personne qui a créé ce tuto ne comprend pas :
In file included from nunchuk_h.cpp:1:
/nunchuck.h:8:22: error: WProgram.h: No such file or directory
/nunchuck.h:10:25: error: utility\twi.h: No such file or directory
In file included from nunchuk_h.cpp:1:
nunchuck.h:13: error: 'byte' was not declared in this scope
nunchuck.h:13: error: expected `)' before numeric constant
nunchuck.h:13: error: expected `]' before ';' token
nunchuck.h:17: error: 'byte' does not name a type
nunchuck.h:18: error: 'byte' does not name a type
nunchuck.h:19: error: 'byte' does not name a type
nunchuck.h:20: error: 'byte' does not name a type
nunchuck.h:21: error: 'byte' does not name a type
nunchuck.h:22: error: 'boolean' does not name a type
nunchuck.h:23: error: 'boolean' does not name a type
nunchuck.h:26: error: 'byte' does not name a type
nunchuck.h:27: error: 'byte' does not name a type
nunchuck.h:28: error: 'byte' does not name a type
nunchuck.h:29: error: 'byte' does not name a type
nunchuck.h:30: error: 'byte' does not name a type
nunchuck.h:32: error: 'byte' does not name a type
nunchuck.h:38: error: 'byte' does not name a type
/nunchuck.h: In function 'void clearTwiInputBuffer()':
nunchuck.h:64: error: 'Wire' was not declared in this scope
/nunchuck.h: In function 'void ConvertOutputs()':
nunchuck.h:93: error: 'byte' was not declared in this scope
nunchuck.h:93: error: expected `;' before 'temp_JX'
nunchuck.h:94: error: expected `;' before 'temp_JY'
nunchuck.h:95: error: expected `;' before 'temp_AX'
nunchuck.h:96: error: expected `;' before 'temp_AY'
nunchuck.h:97: error: expected `;' before 'temp_AZ'
nunchuck.h:99: error: 'temp_JX' was not declared in this scope
nunchuck.h:99: error: 'outbuf' was not declared in this scope
nunchuck.h:100: error: 'temp_JY' was not declared in this scope
nunchuck.h:101: error: 'temp_AX' was not declared in this scope
nunchuck.h:101: error: 'map' was not declared in this scope
nunchuck.h:102: error: 'temp_AY' was not declared in this scope
nunchuck.h:103: error: 'temp_AZ' was not declared in this scope
nunchuck.h:105: error: 'NunC_BZ' was not declared in this scope
nunchuck.h:106: error: 'NunC_BZ' was not declared in this scope
nunchuck.h:107: error: 'NunC_BC' was not declared in this scope
nunchuck.h:108: error: 'NunC_BC' was not declared in this scope
nunchuck.h:119: error: 'NunC_JX_buf' was not declared in this scope
nunchuck.h:119: error: 'bIndex' was not declared in this scope
nunchuck.h:120: error: 'NunC_JY_buf' was not declared in this scope
nunchuck.h:121: error: 'NunC_AX_buf' was not declared in this scope
nunchuck.h:122: error: 'NunC_AY_buf' was not declared in this scope
nunchuck.h:123: error: 'NunC_AZ_buf' was not declared in this scope
nunchuck.h:135: error: 'NunC_JX' was not declared in this scope
nunchuck.h:142: error: 'NunC_JY' was not declared in this scope
nunchuck.h:149: error: 'NunC_AX' was not declared in this scope
nunchuck.h:156: error: 'NunC_AY' was not declared in this scope
nunchuck.h:163: error: 'NunC_AZ' was not declared in this scope
/nunchuck.h: In function 'void NunC_Init(short unsigned int)':
nunchuck.h:180: error: 'PORTC' was not declared in this scope
nunchuck.h:180: error: 'PORTC2' was not declared in this scope
nunchuck.h:180: error: '_BV' was not declared in this scope
nunchuck.h:181: error: 'PORTC3' was not declared in this scope
nunchuck.h:182: error: 'DDRC' was not declared in this scope
nunchuck.h:183: error: 'delay' was not declared in this scope
nunchuck.h:187: error: 'Wire' was not declared in this scope
nunchuck.h:192: error: 'TWBR' was not declared in this scope
nunchuck.h:192: error: 'CPU_FREQ' was not declared in this scope
nunchuck.h:194: error: 'byte' was not declared in this scope
nunchuck.h:194: error: expected `;' before 'rc'
nunchuck.h:207: error: 'millis' was not declared in this scope
nunchuck.h:210: error: expected `)' before numeric constant
nunchuck.h:210: error: expected `)' before ';' token
nunchuck.h:215: error: expected `)' before numeric constant
nunchuck.h:215: error: expected `)' before ';' token
nunchuck.h:220: error: 'rc' was not declared in this scope
nunchuck.h:224: error: 'rc' was not declared in this scope
nunchuck.h:229: error: expected `;' before 'i'
nunchuck.h:230: error: 'outbuf' was not declared in this scope
nunchuck.h:230: error: 'readControllerIdent' was not declared in this scope
nunchuck.h:232: error: 'Serial' was not declared in this scope
nunchuck.h:233: error: 'i' was not declared in this scope
nunchuck.h:233: error: expected `)' before numeric constant
nunchuck.h:235: error: 'HEX' was not declared in this scope
nunchuck.h:241: error: 'Serial' was not declared in this scope
/nunchuck.h: At global scope:
nunchuck.h:245: error: 'boolean' does not name a type
/nunchuck.h: In function 'void NunC_SendNextByteRequest()':
nunchuck.h:266: error: 'byte' was not declared in this scope
nunchuck.h:266: error: expected `;' before 'i'
nunchuck.h:266: error: 'i' was not declared in this scope
nunchuck.h:268: error: 'Wire' was not declared in this scope
nunchuck.h:268: error: expected `)' before numeric constant
nunchuck.h:268: error: expected `)' before ';' token
/nunchuck.h: In function 'void print()':
nunchuck.h:277: error: 'Serial' was not declared in this scope
nunchuck.h:277: error: 'NunC_JX' was not declared in this scope
nunchuck.h:277: error: 'DEC' was not declared in this scope
nunchuck.h:280: error: 'NunC_JY' was not declared in this scope
nunchuck.h:283: error: 'NunC_AX' was not declared in this scope
nunchuck.h:286: error: 'NunC_AY' was not declared in this scope
nunchuck.h:289: error: 'NunC_AZ' was not declared in this scope
nunchuck.h:292: error: 'NunC_BZ' was not declared in this scope
nunchuck.h:295: error: 'NunC_BC' was not declared in this scope
nunchuk_h.cpp: In function 'void loop()':
nunchuk_h:11: error: 'NunC_RecieveCommand' was not declared in this scope
nunchuk_h:13: error: 'NunC_JX' was not declared in this scope
nunchuk_h:16: error: 'NunC_JY' was not declared in this scope
nunchuk_h:19: error: 'NunC_AX' was not declared in this scope
nunchuk_h:22: error: 'NunC_AY' was not declared in this scope
nunchuk_h:25: error: 'NunC_AZ' was not declared in this scope
nunchuk_h:28: error: 'NunC_BC' was not declared in this scope
nunchuk_h:31: error: 'NunC_BZ' was not declared in this scope
si Quelqu'un peut m'aider à trouver une solution, merci d'avance !!
et a bientôt!