Driver skills programming

I’m a new mentor to a local vex middle school, we’re using modkit thus far (and will likely stick with it through the year since the kids somewhat know it).

We’ve done some autonomous programming kids; however, I would like to know what the norm is for some programming for use in driver mode. For instance, if we want to have the R-Up button clamp the claw at X position with Y torque and hold, the the R-Dwn button to open the claw to Z position and hold. Do we program this in modkit and and put it in say slot 4 and when the driver skills challenge is being done the driver needs to run the program in slot 4 so this extra functionality works? or is there another way this is saved and can be ran in driver skills? what’s the norm?

Some teams will need all 4 Modkit slots during their programming skills runs in which case, you can just make sure you load your driver control program on into any of the slots before your run.
The thing to remember is that if you have the Controller block in your Modkit configuration on the program screen, the autonomous program will not run at all (driver or autonomous) if the controller is not switched on and connected to the Brain. Therefore, the most important thing to remember is to remove the controller block from any autonomous only programs. The rest is up to your own preference.

So if a team uses all 4 slots for autonomous, I assume they don’t have any automated functions for driver mode, and those teams likely just select “drive mode” on the processor? If so, how do those teams define what the processor does in the “drive mode” e.g this button opens the claw, this button closes it… and how would those teams get their arms to hold and such and how do those teams define where the drive motors are connected? (Note: I’ve only spent about 3 hours with the teams in the last 2 weeks and the kids know more than I do about the robots, however I have a couple decades of engineering and programming experience, I’m trying to figure out what we can do via this forum since I don’t have a robot to take home)…

Normally you will only need one working auton and one working driving program on the robot, so you really only need two slots. However, if you are resetting the robot many times during an auton run, and you start a different program each time you reset your robot, then the number of slots will become an issue. I’m assuming that’s what your teams are doing.

One way around this is to have one big auton program, instead of a bunch of small ones. Use a Touch LED to launch each segment of the program.

For instance, say you start with one Auton program to get the balls on the blue side of the field (Slot 1 = Blue). You have another program for the orange side of the field (Slot 2 = Orange). And another program to park on the ramp (Slot 3 = Ramp).

First combine all three of those programs into one program. (This is where copy and paste in Modkit would be handy.) This will simply be the Auton program in Slot 1. In the Blue program you probably had an “When Start” block that kicked it off. Change that to an “When Blue”, do the same for Orange, and how about When Red for the ramp program.

Now add an LED to the program and to the robot. Add a When Start block to the LED code, and set the starting color of the LED to Blue. After you add the LED you will get a new option in your When blocks that detects when the LED is touched. When the LED is touched check its color, if it’s blue then Broadcast Blue, this will launch your blue routine. Then change the color of the LED to the next program that you want to run (Orange). When the Blue routine finishes, the LED will be Orange, and when the user touches the LED you should Broadcast Orange, causing the orange routine to run. Do the same for Orange to Red.

Add more colors if you have more auton routines.

Make sense?

Either do as jrp62 suggests or just download the correct program to any slot when you do a driver run, and overwrite it if you need all 4 slots when you do an autonomous run. As long as your file names are sensible, you are fine. e.g. Auton_GetBall1, Auton_ClearFence, Auton_ParkOnBridge, Custom_DriverControl etc.

Thank you for the input. one quick question, that may have been missed above. out of the box, in driver mode, do the kids have to plug the motors into certain ports to have default driver mode functionality? and if you use a program, I assume that all of this default functionality goes away and the kids have to program up all functionality?

driveguy,

If your team wants to us the default Driver Control functionality, they will need to plug in the motors and bumper switches as shown in the Clawbot Build Instructions:

Port - Motor or Switch
1 - - - Left Drive Motor
2 - - - Bumper Switch (limits R-Down)
3 - - - Bumper Switch (limits R-Up)
4 - - - Motor (controlled by R-Up & R-Down)
5 - - - Motor (controlled by F-Up & F-Down)
6 - - - Right Drive Motor
7 - - - Left Drive Motor (same as port 1)
8 - - - Bumper Switch (limits L-Down)
9 - - - Bumper Switch (limits L-Up)​
10 - - Motor (controlled by L-Up & L-Down)
11 - - Motor (controlled by E-Up & E-Down)
12 - - Right Drive Motor (same as port 7)

I always suggest to my teams to wire the robot like this even if they are going to have a custom program. Because this program is fault tolerant: If a motor or a sensor goes bad and there is no time to replace it before a match, the custom program will not start (it will say the the bad motor is missing), however, default driver control will still run even with a missing motor or sensor. So they would still be able to compete in that match.

Paul

Yeah, great question. I also interested to know about this. Thanks!

Paul’s post just above details what the various ports do in the default Driver Control functionality. you can create your own programs in ROBOTC or Modkit and assign controls and ports however you wish, but Paul makes a really excellent suggestion regarding using the default port configuration, especially for new inexperienced teams.

Yes, Paul did answer that question. Thank you.

This week I was told that in the default driver mode (as Paul laid out above), I was told in this mode that the motors have their torque and speed set to 50% or 60% and if we wanted to get full torque and speed out of the motors in driver mode, we would definitely have to do some sort of custom programming to set those up to where we need them.

Can someone confirm this is the case? and is there any documentation I can read the provides these kind of details?

All Paul is saying is that in the event you have a problem with custom program when motor/sensor goes bad, you have a way to at least drive the robot to finish a match. You would normally “have to do some sort of custom programming” but just plug in your devices into the default ports that work for the default Driver Control functionality.

I did not interpret Paul’s post as a suggestion to use default program and you do not have to write custom program… or something to that effect. You can only run one of default Driver Control or another custom program.

" we program this in modkit and and put it in say slot 4 and when the driver skills challenge is being done the driver needs to run the program in slot 4 so this extra functionality works? "
From your original post, Ports and Slots are two different things. You plug in the devices into ports. You can load multiple programs into the brain, where each goes into a “slot”. You can execute/run the program you want by selecting it on the brain. It does not need to be a particular slot.

Yes. Paul answered those questions. However, can you or someone answer the question in post #10 on here?

I see. I have not seen such instructions. Someone else might help. After our kids built clawbot and tested it, they moved on to making changes via custom programming. They changed the gear ratios and ran same Driver Control and the robot would be faster than the default build. We never checked how much slower is the clawbot as compared to any other build that ran custom program.

I just tested a robot running the Default Driver Control; when it is running, you can push the up/down arrow on the brain to toggle through status screens that display port by port performance. With the controller joysticks fully forward, the drive motors in ports 1 or 7 and 6 or 12 are reporting ~120 rpm (which is the top speed of Vex IQ motors).

I also compared the performance of Driver Control to a custom ModKit program, and the top speed was basically identical.

So, I say: The default Driver Control does NOT limit the performance of the motors.

Paul

Thank you all for the help!