Code for vex robotics 2022 spin up

I need assistance on a code for my robot that picks up discs and then spits them back out from the other side. Could anyone assist me on a code for a modified disco please?
The Vex Expert
Spin Up 2022

Please explain. Also, do you know how to code at all? And what language do you want it to be in? How many motors do you have? What buttons do you want it programmed to?
There are loads of people here who are more than happy to help you, but you need to be a bit more exact in what you want. If you have a code please post it (three backtics before if it is in text ``` or a screenshot if it is in blocks
I eagerly await your reply…


What language will you be using? Cpp? Block code? Python? Also, do you want to use pros or vexcode? Did you start your code? Do you have any idea what kind of code you want? What do you have(flywheel or cata)?

Hey, so I actually need help with creating my code. I have 7 motors, and I plan on using block format. I also want to use the block from vex code and I have a 3-4 sensors that detect colors that I want to use. Please if possible respond asap. Thanks!!!

Well to start off, what exactly do you want it to do?

Its the spin up competition. I really don’t know where to start off. Well my first objective was to make it drive.

Try looking at the built in tutorials

Visit the V5 knowledge base here:

Look for the VEXcode V5 tab and scroll down to Blocks Tutorials


Blocks code is pretty straightforward. I don’t see how this would be too difficult. Ask your coach or other teams.

We can’t just… give you code. Remember to check motors and set them up with controllers.

But, since you’re apparently a complete beginner at coding, I think you should actually start with C++. It is slightly harder than blocks, but better and more versatile, and better to start early so you can get used to it.

Remember to code a flywheel, conveyor, drivetrain, and roller, as most robots will contain those.
If you don’t know this, even if your team doesn’t know coding, have you not talked to them at all? It’s rather late in the season…


To add on to @soritarian1, you should ask your mentor for some basics. They can’t make the code for you, but they can direct you in the correct way. There are also tons of tutorials on YouTube and built into VexCode itself.


Well, my mentor says that he doesn’t really know much and well as you can see, I have no clue since it is my first time in v5. I was wondering if I can get like in a meeting with someone so that they can show me more step by step on how to use the program. At this point, I know it is very late so I plan on using the block program. If possible can somebody get in touch with me?

If you tell me exactly how your robot works (or is meant to), and tell me how you would like the driving to be set up, and which buttons you want the other motors on, I will write a commented program in blocks that you can try. However, you have to tell me exactly how many motors you are using for what. For instance I need to know if you have a 2 or 4 motor drivetrain.

1 Like

Ah. Now I realize the situation. I’m guessing you’re joining for your second-semester class switch/whatever, right?
Well, you can start with the block program, and that shouldn’t handicap you very much unless you are using some sort of endlessly complicated pneumatic system.
As for just giving you code, we can’t do that. But, as requested, we can definitely help.
The first thing you want to do is figure out if your robot’s drive is 2-motor or 4-motor. Also ask your team the ports of these motors, this is very important. Then you can add a drivetrain (see image 1)

It will immediately ask you the ports.
Then add more motors and name/port them accordingly.
Now you should add a controller. (see image 2)

You can click on the buttons on the digital (on v5) controller to sync motors with buttons, and once you have all of those connected, you’re essentially done with your basic program.
Now, all you need is autonomous, but that shouldn’t be too hard to figure out. Remember, use a yellow “when autonomous” hat block rather than the provided “when started” one for that.

Your team/fellow teams might still know some coding, so always remember to ask!

Also, save it (see image 3)

up here, and name it. Remember to save every time you exit it/close your computer!

Also, extra note, once you have added the drivetrain and other motors, new “drivetrain” and “motion” blocks will be added to the sidebar, you can use those for autonomous.

1 Like

Perfect, thanks for the help. I am a first beginner with this program so I am actually trying to get some extra help. If someone can share me there email of some contact to get in touch more quicker in case I need some more help. I figured out that my robot is a 2-drive terrain. So yeah. Thanks !!!

i know how to code just want to make sure i am getting an effective code

Can you help me out?

Hi there, I’d be more than willing to help you out with mentoring you and your team to improve your programming skills. I’m usually available by email, and we could probably set up some kind of video call if you want some extra help. However, in the interest of student safety and transparency, we would need to make sure that your mentor or some other trusted adult is kept in the loop. Do you think it would be possible for you to get your mentor to reach out to me so we can perhaps set something up?

My email is redacted by mods, sorry no personal contact info on the forum.

Good luck!

Hey, I asked my proctor and he said that it is fine. If you are able to, can you send me your email and get like in a google meeting?

Hey, are you till able to help me out? I really got stuck and need help. If possible, thanks!

Your best bet is going to be contacting Jacob via discord or his web site (click on his avatar). Forum TOS does not allow personal contact details to be posted.