So currently i have been able to program my arduino on its own using the Arduin IDE program but i would like to be able to set it so i can slow down the speeds of the servo and make a more complex code so my inmoov hand can run through a series of commands on its own and change positions

i have attached the file i have written in the arduino IDE

HAND.ino

#include <Servo.h>
Servo thumb;
Servo index;
Servo middle;
Servo ring;
Servo pinki;
Servo wrist;
 
void setup()
{
  thumb.attach(3);
  index.attach(5);
  middle.attach(6);
  ring.attach(9);
  pinki.attach(10);
  wrist.attach(11);
}
void loop()
{
  handopen();
  delay(5000);
  handclose();
  delay(5000);
}
 
void handopen()
{
  wrist.write(90);
  thumb.write(0);
  index.write(0);
  middle.write(0);
  ring.write(0);
  pinki.write(0);
}
void handclose()
{
  wrist.write(90);
  thumb.write(180);
  index.write(180);
  middle.write(180);
  ring.write(180);
  pinki.write(180);
}
  
  
  

GroG

10 years 3 months ago

Hello and Welcome Brett

Ok lets move in small steps.  You've done well so far getting MRLComm.ino loaded on the Arduino & you can move with the sliders.  

So far from your screen shot it looks like you start InMoovHand from the gui and have successfully connected to the Arduino.  

The next step would be to start Python.  You can do this the same way you did with the InMoovHand.  Right click on Python, and name it "python".  Like this

 

The next step is to write a small script which changes the speed of the fingers and goes through some basic hand gestures.  Like this.

Let us know how it goes.  (Press the execute button - one with green arrow pointing right) to run it.
 

hey so the code you posted above worked the first time i tried it but then came up with some error codes im emaling GroG a screenshot since it still wont let me upload