ok so my other teamate had programmed the drive train for our bot. well i was given the job to install the four wheel drive. so the four wheel drive is in but when i programmed it from 2 motor to 4 motor the thing wont drive at all. i have made sure the controls are set and the gear ratio is correct. what did i do wrong?
I don’t know. Why don’t you post your code so we can figure this out, ok.
maybe the front or back wheels are reversed. you may need to change that in ur code
maybe the front and back wheels are trying to spin opposite ways. I had that problem this year.
to @Vexation , I think you said the same thing, but I wanted it to be clear.
yeah that’s what I was trying to say
this code works fine when it is with just 2 motor drive
btw the motors dont go at all its not like they go anf get stuck. they just wont turn no matter what i do. all the other functions (i.e my forklift and tailbar) work fine. but both my wheel motors and the extra two motors that turn the front wheels dont work
You haven’t set the drivetrain to a control.
Click either of the joysticks icons on the controller in the device setup part of VexCode, it should give you a few different drive options, keep clicking to scroll through them.
If you are trying to use the if ButtonUp pressed
to drive, you will need to put it inside a forever loop, so the program keeps checking, and attach the forever loop to the when driver control start block!!! Otherwise, click the joysticks on “Select bottons to set actions” until it shows the kind of driving you want.
just click on the joystick controller in the code
You don’t have the drive set up on the controller
I have tryed to set up the joysticks over 3 times. i have selected the way i want they to move and saved it. it still doesnt work
Your block of code that turns the motors isn’t attached to a condition. It is essentially dead. You should put it under “when driver control” or “when started” (the yellow blocks with rounded tops).
ok i take that back. when i press the arrow buttons ( up and down) they will continue driving until i hit the oppite button and then it will continue repeating that until i end the program. there doesnt seen to be a "controller1 {joystick direction} pressed? " block
If you want to use a joystick, I’m not sure which section it’s under, but there is a variable that tells you the value of the joystick at that moment. You would use that variable and just say something like “set drive velocity to (joystick value)%” and “drive forward”.
Disclaimer: I might be wrong. I don’t code in blocks.
Especially if you want to use a joystick, I highly recommend clicking the joystick on this screen into you get your preferred control type, and don’t forget to click as many dones as you need to.
If you want to code your joystick driving in blocks, there is a round-ended block that says something like “Controller1 axis 3 position” which outputs the forward-backward position of the left joystick. All the way forward is 100 and all the way backward is -100. (I would guess. Full disclosure: I have only ever done VEX IQ and I only used blocks for a short while. Therefore, all of this is really just my educated guesses. You will want to print the controller joystick output to the brain and test first.) If you wanted tank drive, you would say, “Set left motors’ velocities to Controller1 Axis 3 position
.” If you wanted left-stick arcade, you would say, “Set left motor velocity to Controller1 Axis 3 position - Controller1 Axis 4 position
.”
Since you are using buttons right now, you will want to say, “If I’m not pressing ButtonUp or ButtonDown, stop driving.”
If you need more help, feel free to ask.
My sinceres apologies to you. im a absolute idiot and thought when you click your joystick button on the controller menu, you had to choose each time the directions came up. so i clicked on which button i thought was right until they didnt come up anymore. i thought that meant it was programmed. in actuality, those were seperate options for how the bot was controlled. im a complete idiot and im sorry for waiting your time
thank you so much for your time, patience and overall helpfulness. people like you are the reason this fourm is as pheonomanal as it is. thank you.