I finally bought all the parts and got all the kinks out of my Robotic Arm.
Short youtube video:
Here is my code:
#include <nunchuck_funcs.h>
#include <Wire.h>
#include <Servo.h>
Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;
Servo servo6;
byte zbut,cbut;
void setup()
{
nunchuck_init_with_power();
servo1.attach(5);
servo2.attach(4);
servo3.attach(3);
servo4.attach(2);
servo5.attach(10);
servo6.attach(8);
Serial.begin(19200);
Serial.print("Ready");
}
void loop()
{
nunchuck_get_data();
zbut = nunchuck_zbutton();
cbut = nunchuck_cbutton();
if ( cbut ){
servo1.write(160);
servo2.write(135);
servo3.write(125);
servo4.write(70);
servo5.write(180);
}
else {
servo1.write(0);
servo2.write(180);
servo3.write(175);
servo5.write(180);
}
if ( zbut ) {
servo4.write(110);
servo6.write(40);
}
else {
servo6.write(180);
servo4.write(90);
}
Servo::refresh();
}
This is where I need your help, I've spent a lot of time on this and would like to go further with. I need ideas on what to do with it next and how to improve it. Any suggestions or comments are much appreciated!
shameless digg link: http://digg.com/gadgets/Arduino_Robotic_Arm