Arm Robot C++ Coding

Way to RTFM it !

Now why wasn’t that done first? :smiley:

Nice work RobotFreak & Ro-Bot-X

Clearing Things Out … Again

Hey Guys,

As I mentioned before I’m absolutey new in making robots! Like my experience is nothing. I’m only into programming but I haven’t ever tried to program a robot.

All I need is a Sample C++ program to control 4 servos so I can learn by it and make some changes based on my understanding later! I’ve entered the AX12Arm Library as Mr. RobotFreak suggested and I think there’s a problem with my VS installation… making things even more worse. I can’t understand the logic without making things work appropriately!

Rather than that, thank you all, I guess I should give it up. :frowning:

Thank you again.


Im working on a windows xp box.

Yes I have Java 1.6.

I dont have specific hardware yet I am waiting for a robotis bioloid premnium robot kit to come .

Break it down into small steps.

  • You said you got 1 Servo to work !  Excellent - that’s progress.  Tell us exactly what you do to get that 1 Servo to turn.  Did you compile a program, if so please post the code !
  • You say you downloaded the sample program.  It looks like its supposed to take joystick input, do you have a joystick?
  • You say you think your VS installation has a problem,  What is the problem?  We can’t help you unless you give us enough information.
  • You say you can’t understand the logic?  What logic?

Alright, I was able to move

Alright, I was able to move the 4 servos using the MS VS! But one by another. I mean, I have to change the values over and over for each motor from the program itself. I asked and been told that I should add this in the program:

private void MoveRobot()

{

// Motor 1 Go

SetAngularPositionAndSpeed(Motor_1_ID, Motor_1_Position, Motor_1_Speed);

// Motor 2 Go

SetAngularPositionAndSpeed(Motor_2_ID, Motor_2_Position, Motor_2_Speed);

// Motor 3 Go

SetAngularPositionAndSpeed(Motor_3_ID, Motor_3_Position, Motor_3_Speed);

// Motor 4 Go

SetAngularPositionAndSpeed(Motor_4_ID, Motor_4_Position, Motor_4_Speed);

}

 

So that, they move together. But the previous code is in C# not C++ which I require. Since that the both languages not differ much, can I use the same code? Or I should make some changes for there is a certain translation for ‘SetAngularPositionAndSpeed’ in C++?