Extensive vexcode pro learning

Hi. I want to learn more about coding. I know the basics and how to code basic autonomous. I want to learn more, because there are so many things that people can do that helps so much for perfect autonomous, and even better driving. It is also a very good thing for what I want to do in life. Does anyone know what I can do to learn some more? Thank you!

1 Like

I think that is the whole point of robotics - extensive learning.

There is no such thing as “perfect” but rather a whole lot of iteration that occurs in the engineering design process that incrementally yields more favorable outcomes. Little things matter, like that chain that fell off during the match - why? can you find better configuration so it does not fall off? Those little things matter if not fixed.

What do you use to learn more? A plethora of resources are available and linked to this forum. Read, watch, and try them out. At competition ask from surrounding teams in the Pits about their bots. You will find many ready to share. Try their ideas out.

Coding - well find a good intro course to coding - it will yield structured code that is easier to understand and fix.

Good luck! There is no magical silver bullet that will make you better at building and coding robots than time and lots of testing and practice.

6 Likes

Also, it would be helpful to know what resources you have already tried?

4 Likes

I have just used the knowledge hub, and my coach, Mr. Schluter’s videos on it. I know how to code. I just want to learn more on how to code. There are so many different things people can do, and the knowledge base has very little.

learn pid its where u have a gyro on ur robot and if the angle isn’t right on the gyro then u try to fix the drift in driving by doing it in the code. vexcode is good, because im too lazy to do robotc, if u dont know wut im talking about, i dont really either :stuck_out_tongue: also youtube is better if u can find that thing

1 Like

You might want to do a search on VEXforum for topics that might be relevant to the situation you are trying to address - for example
“PID tutorial VEXcode” yields plenty of good starting points.

I am sure if you are more precise about what you are looking for, you will get better responses.

1 Like

Nothing wrong with a little bit of handholding. Here’s some suggestions to get started:

4 Hour course on C++

To get a quick and fast understanding of C++ coding, grab a pen and paper and take notes on this video by **Mike Dane**:

You will realize that if you hear “Mike Dane,” you know you’re gonna get a good quality coding video. He teaches various languages beyond merely C++, like Python, Ruby, and SQL. Bear in mind that some featues of C++ may not exist in VEXCode Pro, and vise versa. In VEXCode, if you want to view print outputs on the computer the robot must be connected via micro USB directly from V5 brain or from the controller.

VEXCode's tutorial videos

As for VEXCode, you can find tutorials via File > Open Tutorials although there isn't much there. Note: I highly advise avoiding the drivetrain tutorial and any drivetrain objects because it is unnecessary and restricts your freedom of how you wish to control the robot

One of my tutorials on VEXCode

Additionally, one of my videos seems useful with teaching how to code in VEXCode:

How to access the internal VEXCode API for a command

I have to be honest, this is the only way I know how to access an API for VEXCode with good and extensive detail. I wish there were a simpler way to do this but this is the best way I know.

To view what things do in vexcode, add your necessary sensors (in my case, I will add a motor):

How to add a motor
  1. Motors and sensors setup, top right of the screen
    Screenshot 2021-11-27 154619
  2. Add a device
    Screenshot 2021-11-27 154518
  3. Select Motor
    Screenshot 2021-11-27 154533
  4. Select a Port
    Screenshot 2021-11-27 154543
  5. Modify changes and select done
    Screenshot 2021-11-27 154557

After you add a motor, additional stuff gets added to the command reference tab

How to access command references tab
  1. Click the question mark
    Screenshot 2021-11-27 154610
  2. Click “Command References” tab


As you can see, motor commands are added. If you wish to learn more about it, copy the command and paste it into your text editor:
Screenshot 2021-11-27 154651
Then, right click the command (in this case setMaxTorque) and click “command help”
Screenshot (477)

A menu with in-depth information will tell you what everything does, what is returned, and how it functions.

Some good-to-know variable information

Some in-depth about variables:
Variables are things you assign and that stores a value

int a = 1;

is an example of a variable (as you can see it is an integer, or int, which means the variable will contain a number that has no decimal places).
Bools are variables that store 1 (true) and 0 (false)
Bools can be used to store operations:
i.e

bool b = false;

and you can add that into statements:

if (b){
//stuff here
}

just which would have the same result as

if (false){
//stuff here
}

or

if (5==2){
//stuff here
}

All of these if statements will not run because it is false inside of the parameters ( ). In order for something to be true you must have true in the paramters.
As for the other variables, there are float, double, and a couple others but you’ll mostly run into floats, doubles, bools, and ints.
A double is a number that has decimal places.

double c = 0.2131298;

A float is basically a lightweight version of a double except it doesn’t store as many decimal places as a double. The performance is almost negligible with V5 unless you plan to do some extreme computation, which is unlikely.

13 Likes

Thank you so much for this.

3 Likes