well youve come to the right place!
Remove these ads by
Signing UpStep 1: Supplies
most can be found at radioshack and at hardware stores.
if you cant find any etchant solution i made my own on STEP 6.
+ iron
+scisors
+tape
+soft gloss photo paper
+arduino
+wii nunchuck
+LED's
+brake cleaner
+etchant solution (is makeable, see step 6)
+double sided PCB .062" thick (you do have a bit of lee way)
+solder
+hack saw















































Visit Our Store »
Go Pro Today »




excuse me but i am really a newbee in arduino...
i am trying to make this instructable, but when i want to load the sketch i have this error:
-------------------------------------------------------------------------------------------------------------------
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
nunchuck_funcs.h:24: error: 'delay' was not declared in this scope
/nunchuck_funcs.h: In function 'void nunchuck_init()':
nunchuck_funcs.h:33: 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.
nunchuck_funcs.h:34: 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.
/nunchuck_funcs.h: In function 'void nunchuck_send_request()':
nunchuck_funcs.h:43: 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.
/nunchuck_funcs.h: In function 'int nunchuck_get_data()':
nunchuck_funcs.h:63: 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.
/nunchuck_funcs.h: In function 'void nunchuck_print_data()':
nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
i also tested various sketches from other instructables and i always have errors !
with the included libraries i have no problem !!!
what is it happening ?
please help me !
PS:
i have the Arduino Mega Atmega1280 and use Arduino V1.0
thanks for answering that quick !
so it is due to the V1 ?!?
i was searching the Arduino 22, but i cant find it ! could you please send me that version by mail please?
tha would be very friendly...
regards
yes i found them, but nothing works, i mean, the sketches seem to install correctly, but nothing happens, only sometimes the led 13 keeping alive and my up and left led staying lighting with no change from nunchuck.
the leds are new, the nunchuk too and even better i cutted the cable to connect directly on the board, so no false contact... but nothing...
have tryed to send only the pde, then i try to send pde and h files and nothing... disapointed ! :(
i think i'll wait you V1 version !
thanks
now i placed the folder in C:\Documents and Settings\mich\My documents\Arduino\
i open the .ino i converted before, start loading and now:
----------------------------------------------------------------------------------------------------------------------
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
nunchuck_funcs.h:24: error: 'delay' was not declared in this scope
/nunchuck_funcs.h: In function 'void nunchuck_init()':
nunchuck_funcs.h:33: 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.
nunchuck_funcs.h:34: 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.
/nunchuck_funcs.h: In function 'void nunchuck_send_request()':
nunchuck_funcs.h:43: 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.
/nunchuck_funcs.h: In function 'int nunchuck_get_data()':
nunchuck_funcs.h:63: 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.
/nunchuck_funcs.h: In function 'void nunchuck_print_data()':
nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope
In file included from WiiChuckDemo.cpp:105:
/nunchuck_funcs.h: At global scope:
nunchuck_funcs.h:14: error: redefinition of 'uint8_t nunchuck_buf [6]'
nunchuck_funcs.h:14: error: 'uint8_t nunchuck_buf [6]' previously declared here
/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
nunchuck_funcs.h:17: error: redefinition of 'void nunchuck_setpowerpins()'
nunchuck_funcs.h:17: error: 'void nunchuck_setpowerpins()' previously defined here
/nunchuck_funcs.h: In function 'void nunchuck_init()':
nunchuck_funcs.h:29: error: redefinition of 'void nunchuck_init()'
nunchuck_funcs.h:29: error: 'void nunchuck_init()' previously defined here
nunchuck_funcs.h:33: 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.
nunchuck_funcs.h:34: 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.
/nunchuck_funcs.h: In function 'void nunchuck_send_request()':
nunchuck_funcs.h:40: error: redefinition of 'void nunchuck_send_request()'
nunchuck_funcs.h:40: error: 'void nunchuck_send_request()' previously defined here
nunchuck_funcs.h:43: 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.
/nunchuck_funcs.h: In function 'char nunchuk_decode_byte(char)':
nunchuck_funcs.h:49: error: redefinition of 'char nunchuk_decode_byte(char)'
nunchuck_funcs.h:49: error: 'char nunchuk_decode_byte(char)' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_get_data()':
nunchuck_funcs.h:57: error: redefinition of 'int nunchuck_get_data()'
nunchuck_funcs.h:57: error: 'int nunchuck_get_data()' previously defined here
nunchuck_funcs.h:63: 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.
/nunchuck_funcs.h: In function 'void nunchuck_print_data()':
nunchuck_funcs.h:79: error: redefinition of 'void nunchuck_print_data()'
nunchuck_funcs.h:79: error: 'void nunchuck_print_data()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_zbutton()':
nunchuck_funcs.h:141: error: redefinition of 'int nunchuck_zbutton()'
nunchuck_funcs.h:141: error: 'int nunchuck_zbutton()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_cbutton()':
nunchuck_funcs.h:147: error: redefinition of 'int nunchuck_cbutton()'
nunchuck_funcs.h:147: error: 'int nunchuck_cbutton()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_joyx()':
nunchuck_funcs.h:153: error: redefinition of 'int nunchuck_joyx()'
nunchuck_funcs.h:153: error: 'int nunchuck_joyx()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_joyy()':
nunchuck_funcs.h:159: error: redefinition of 'int nunchuck_joyy()'
nunchuck_funcs.h:159: error: 'int nunchuck_joyy()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_accelx()':
nunchuck_funcs.h:165: error: redefinition of 'int nunchuck_accelx()'
nunchuck_funcs.h:165: error: 'int nunchuck_accelx()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_accely()':
nunchuck_funcs.h:171: error: redefinition of 'int nunchuck_accely()'
nunchuck_funcs.h:171: error: 'int nunchuck_accely()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_accelz()':
nunchuck_funcs.h:177: error: redefinition of 'int nunchuck_accelz()'
nunchuck_funcs.h:177: error: 'int nunchuck_accelz()' previously defined here
WiiChuckDemo.cpp: At global scope:
WiichuckDemo:3: error: redefinition of 'int loop_cnt'
WiichuckDemo.pde:-1: error: 'int loop_cnt' previously defined here
WiichuckDemo:5: error: redefinition of 'byte accx'
WiichuckDemo.pde:-1: error: 'byte accx' previously declared here
WiichuckDemo:5: error: redefinition of 'byte accy'
WiichuckDemo.pde:-1: error: 'byte accy' previously declared here
WiichuckDemo:5: error: redefinition of 'byte accz'
WiichuckDemo.pde:-1: error: 'byte accz' previously declared here
WiichuckDemo:5: error: redefinition of 'byte joyx'
WiichuckDemo.pde:-1: error: 'byte joyx' previously declared here
WiichuckDemo:5: error: redefinition of 'byte joyy'
WiichuckDemo.pde:-1: error: 'byte joyy' previously declared here
WiichuckDemo:5: error: redefinition of 'byte zbut'
WiichuckDemo.pde:-1: error: 'byte zbut' previously declared here
WiichuckDemo:5: error: redefinition of 'byte cbut'
WiichuckDemo.pde:-1: error: 'byte cbut' previously declared here
WiichuckDemo:6: error: redefinition of 'int ledPin'
WiichuckDemo.pde:-1: error: 'int ledPin' previously defined here
WiichuckDemo:7: error: redefinition of 'int Lledpin'
WiichuckDemo.pde:-1: error: 'int Lledpin' previously defined here
WiichuckDemo:8: error: redefinition of 'int Rledpin'
WiichuckDemo.pde:-1: error: 'int Rledpin' previously defined here
WiichuckDemo:9: error: redefinition of 'int Uledpin'
WiichuckDemo.pde:-1: error: 'int Uledpin' previously defined here
WiichuckDemo:10: error: redefinition of 'int Dledpin'
WiichuckDemo.pde:-1: error: 'int Dledpin' previously defined here
WiiChuckDemo.cpp: In function 'void setup()':
WiichuckDemo:13: error: redefinition of 'void setup()'
WiichuckDemo.pde:-1: error: 'void setup()' previously defined here
WiiChuckDemo.cpp: In function 'void loop()':
WiichuckDemo:22: error: redefinition of 'void loop()'
WiichuckDemo.pde:-1: error: 'void loop()' previously defined here
----------------------------------------------------------------------------------------------------------------------
another type of error... i don't understand...
i placed the .pde and the .h files to: libraries\Servo\examples\WiiChuckDemo
then i renamed .pde to .ino
i restart loading and now here is the error:
----------------------------------------------------------------------------------------------------------------------
sketch_jan01a.cpp:3:28: error: nunchuck_funcs.h: No such file or directory
sketch_jan01a.cpp: In function 'void setup()':
WiichuckDemo:16: error: 'nunchuck_setpowerpins' was not declared in this scope
WiichuckDemo:17: error: 'nunchuck_init' was not declared in this scope
sketch_jan01a.cpp: In function 'void loop()':
WiichuckDemo:27: error: 'nunchuck_get_data' was not declared in this scope
WiichuckDemo:29: error: 'nunchuck_accelx' was not declared in this scope
WiichuckDemo:30: error: 'nunchuck_accely' was not declared in this scope
WiichuckDemo:31: error: 'nunchuck_accelz' was not declared in this scope
WiichuckDemo:32: error: 'nunchuck_joyx' was not declared in this scope
WiichuckDemo:33: error: 'nunchuck_joyy' was not declared in this scope
WiichuckDemo:34: error: 'nunchuck_zbutton' was not declared in this scope
WiichuckDemo:35: error: 'nunchuck_cbutton' was not declared in this scope
-------------------------------------------------------------------------------------------------------------------
it looks like no finding the.h file ...
what i am doing wrong ?
please help !
thank you in advance.
Also, good 'ible! Especially step 6.
understand joyy, joyx, accy and accx... but I can't understand accz... what kind of move change accz value? I shake the nunchuk, the value changes, but i cant understand exactly which move change this value
thanks
http://goo.gl/ccf2P
You can skip the computer part and draw the circuit with a sharpie saving you some good time. Besides, this version uses a straight header pins which causes you to lose an extra analog pin due to the board size.
In the Arduinolog's version, he used a 90 degree header pin leaving the anlog pins free to use.
Worths a look!
Cheers.
http://www.hvwtech.com/products_view.asp?ProductID=1081
(your sense of humor highly appreciated :)
Clk NC Gnd
__---__---__
__---__---__
Pwr Att Dat
pinMode(Lledpin, OUTPUT);
pinMode(Rledpin, OUTPUT);
pinMode(Uledpin, OUTPUT);
pinMode(Dledpin, OUTPUT);
anywhere in the "setup()" function and see if it makes a difference.
Also, I see no current-limiting resistors in his circuit. Some LEDs work fine without them in certain situations, but most will burn out or have greatly reduced life. (and you might damage your Arduino too) Be sure to add a 220 ohm resistor in series with each LED.
And thank you RazorConcepts and JohnPark for the clarifications. FunGizmos.com does indeed stock my Wiichuck adapter for $4, and that includes the 4-pos pin header needed and free domestic shipping.
Right now I'm working on a project for school, I'm making a Nunchuck/Arduino controlled mechanic arm, it has 3 DC motors for moving the base and 2 parts of the arm and 1 step motor to control the gripper. I might upload my own code, along with a video and pictures of the arm itself, maybe even write an instructable about the whole thing. The code was based on this one but more complex. This is my first time using Arduino and I liked it, I'll see what else comes to mind.
Thanks to everyone! :D We'll be in touch.
and I loved the comments on the pixes :-))
http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/
You can pick one up for like 3 bucks, they work nicely.