The Wooden Menace; Robotic Arm

Questions and Comments on All Projects
ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Fri Feb 04, 2011 9:18 pm

Code: Select all

   //The sample function, while not used, is a way of demonstrating autonomous movement.
            //The controller does not need to be plugged in while this function runs.
void sample(void)
{
init();

move(0,0,0xF400,0xF000,0);

Delay10KTCYx(250);
Delay10KTCYx(250);   //Wait 1 Second

move(0,0,0xEF77,0xF277,0); // GRIP!

Delay10KTCYx(250);
Delay10KTCYx(250);   //Wait 1 Second

move(0,0,0xEE00,0xF500,0);

Delay10KTCYx(250);
Delay10KTCYx(250);   //Wait 1 Second

move(0,0,0xEF77,0xF277,0);   //UNGRIP!

Delay10KTCYx(250);
Delay10KTCYx(250);   //Wait 1 Second

}


(1) The function first performs an initialization [init()]

(2) Then it moves two servos to a certain location [move()]

(3) Then it waits for 1 second using two delay functions [Delay10KTCYx()]

(4) It continues doing this 3 times, moving the gripper servos.

The move function, resets the location of the servo motor, which tells the servo to move to the new location.

Code: Select all

void move(int one,int two,int three,int four, int five)


It depends on which servo you want to move, you can move 0 to 5 since there are 5 servos to choose from. For example, if you want to move servos Two and Four to a new location:
move(0,0xF000,0,0xF000,0);


This would move both servos to location 0xF000. Putting 0 for all other servos, tells the function not to move those servos, leave them at their currently set location.
Last edited by ThePyroElectro on Sat Feb 05, 2011 5:14 am, edited 1 time in total.

geekminator
Newbie Pyro
Posts: 6
Joined: Wed Jan 05, 2011 11:48 pm

Postby geekminator » Sat Feb 05, 2011 3:49 am

Thanks, you are the best

nosmer.kram
Newbie Pyro
Posts: 2
Joined: Sun Jan 20, 2013 3:45 pm

Re: The Wooden Menace; Robotic Arm

Postby nosmer.kram » Sun Jan 20, 2013 3:53 pm

We're going to build this project.. we have the IC in hand. where would we start?? sgould we build the schematic first? or program the IC? thanks for the immediate reply

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: The Wooden Menace; Robotic Arm

Postby ThePyroElectro » Wed Jan 23, 2013 6:48 pm

nosmer.kram wrote:We're going to build this project.. we have the IC in hand. where would we start?? sgould we build the schematic first? or program the IC? thanks for the immediate reply


Make sure you can program the IC. Then connect 1 servo motor to the microcontroller and make sure the servo motor is controlled by the microcontroller.

You need to make sure you understand how to load a program onto the microcontroller FIRST because you will need to do software debugging at some point, projects never work perfectly on the first try.

nosmer.kram
Newbie Pyro
Posts: 2
Joined: Sun Jan 20, 2013 3:45 pm

Re: The Wooden Menace; Robotic Arm

Postby nosmer.kram » Wed Jan 30, 2013 2:43 am

sir. we already programmed the IC using the code provided in the wooden menace... we also connect one servo on the IC. how do we test if the servo is being controlled by the IC???? and next thing we're having a hard time to figure out what is theconnection of the PS1 controller in the IC . thanks for your reply.

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: The Wooden Menace; Robotic Arm

Postby ThePyroElectro » Wed Feb 06, 2013 10:41 pm

nosmer.kram wrote:sir. we already programmed the IC using the code provided in the wooden menace... we also connect one servo on the IC. how do we test if the servo is being controlled by the IC???? and next thing we're having a hard time to figure out what is theconnection of the PS1 controller in the IC . thanks for your reply.


Hello,

If the servo is being controlled by the IC, you will not be able to move it and it will hold its position. Alternatively, you can use an oscilloscope to check the output control signal voltage vs. time. The PS1 controller was a simple shift register common in most arcade controllers. You can look at the source code to see how the controller information was shifted out and then executed, or you can build your own controller code with something more simple like push buttons.

johnnypal5
Newbie Pyro
Posts: 1
Joined: Wed Nov 06, 2013 7:44 pm

Re: The Wooden Menace; Robotic Arm

Postby johnnypal5 » Wed Nov 06, 2013 7:53 pm

hi i need help with the code amm in a last question said change the code to use 4 buttons replacing the joystick but i cant do that so somebody can help me???? :shock: :shock: :shock: :shock: :?: :?: :?: :?:


Return to “Projects”

Who is online

Users browsing this forum: No registered users and 5 guests