I am brand new to Tetrix. I have been trying for a week to get my Tetrix Ranger Bot to work. I was able to program the Ranger Bot to move. However, I cannot get the arm and gripper to move with my joystick. I am referring to this arm and gripper: http://www.tetrixrobotics.com/gettingst ... ion2_3.htm. The sample program on this page is the automated version. I want to use my joystick. Any help with be greatly appreciated!

Sat May 24, 2014 8:56 pm

BurningLights

Professor

Joined: Sat Aug 31, 2013 9:15 amPosts: 256

Re: Tetrix Ranger Bot Arm and Gripper

What are you trying to use to make the arm and gripper move? Buttons? Thumbsticks? The D-pad? If you post the code you have so far, we'll be able to help you out a lot more easily.

if(abs(joystick.joy1_y2) > threshold) // If the right analog stick's Y-axis readings are either above or below the threshold: { motor[motorD] = joystick.joy1_y2; // Motor D is assigned a power level equal to the right analog stick's Y-axis reading. } else // Else if the readings are within the threshold: { motor[motorD] = 0; // Motor D is stopped with a power level of 0. }

if(abs(joystick.joy1_y1) > threshold) // If the left analog stick's Y-axis readings are either above or below the threshold: { motor[motorE] = joystick.joy1_y1; // Motor E is assigned a power level equal to the left analog stick's Y-axis reading. } else // Else if the readings are within the threshold: { motor[motorE] = 0; // Motor E is stopped with a power level of 0. }

Both motors work correctly. However, they are operating at 100%. I want to power both mothers (D,E) at 50%.

Wed May 28, 2014 3:42 pm

BurningLights

Professor

Joined: Sat Aug 31, 2013 9:15 amPosts: 256

Re: Tetrix Ranger Bot Arm and Gripper

bjoe777 wrote:

Both motors work correctly. However, they are operating at 100%. I want to power both mothers (D,E) at 50%.

Ah, OK. The values for the joystick axes go from -128 to +127. If you multiply the values by 0.5 before assigning them to the motor powers, this will give you a range of -64 to +63, which is about what you want. Or, to be a little more precise, you can multiply it by 0.39, which will give you a range of -50 to +49.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum