Motor 6 speed control

Time crunch, desperate, asking help.

Our robot has a rather delicate device that needs to be controlled from button 6. The problem is it moves too fast when direct driven, so we geared it to slow down. Of course, now it has enough torque to tear itself apart. Limits are impractical because of the short range and space allowed.

Since the motor was properly “weak” enough when direct driven, we really need to just slow it down, which i understood could be done using the EasyC in the programming kit. Perhaps now would be a good time to put those two kits to use, eh?

Anyway, we need to throttle the motor speed back by a 3rd or so. I have found a couple posts about this and they were admittedly over our heads right now. Is there a simple way to reduce the motor speed by a 3rd. Like real simple. Let me be clear…
Create this, Insert that, Modify this, upload there, etc.

If it matters, the down can be full speed, just the UP has to be slower.
Oh, did I mention we are two days from competition?
We do have 5 spare controllers to experiment with so the bot is never at risk.

Any help and I’ll be your best friend ALL day!!

This is how you do what you are after.
1.) create a while(1) loop
2.) Create a variable
3.) Drag in the block and select you channels and the variable you created
4.) create an asignment something like var = (var - 127)/2
5.) drag a motor block and select motor and put var + 127 in the speed.

If this is over your head see getting started in the help file. Good luck.

Thanks King!

okdokee.
although i had to figure out what kind of variable, etc. this worked.
The motor does indeed turn at a reduced rate.
of course, no other buttons do a single thing, duh, because the program isn’t an add-on or enhancement, it’s a complete replacement and I am very glad i applied this to one of the spares.
:slight_smile:
This of course leads me to two questions.
Is there a default out of box template that could be modified with this loop, or do i have to recreate the entire default program from scratch?
It’s not just the motors, we are using the interrupts too.
One would think there would exist a VEX Default.ECP file

No, you have to recreate the program yourself, the default code doesn’t use interrupts it just uses bump switches (digital inputs) which and be quickly programmed in easyC. I suggest you read the getting started section in the help file or goto the FAQ were we have a 30min video posted on how program sensors and such.