Program Remote

My team is looking to program the buttons on the remote so that they can turn an intake on and let it run. Is that something that they can do in driver control? Thanks.

You can do this easily, but it is not a part of the default “driver control.” Your team will need to use a bit of programming. Most teams use Modkit or RobotC, personally I encourage students to use the later.

Yes, there are quite a few different ways of making this happen. What programming language are you using?

The fastest way to program a VEX IQ Controller is Robot Mesh’s Controller Express, which works on Windows with Chrome, Firefox and Internet Explorer, Mac OS X 9&10 with Chrome, Google Chromebooks, and Ubuntu Linux 12.04 and 14.04. Here’s how you use it:

  1. Go to robotmesh.com
  2. Click on “Python/Blockly” in the menu bar
  3. Click on “FREE to use online here”
  4. Install the Robot Mesh Connect Plug-In for your browser. (This allows us to communicate with the USB port. See the list of supported browsers at the top left of the screen.)
  5. Click on “Create a New Project”
  6. Click on “VEX IQ Controller Express Project” and give your project a name. Then click “Create.”
  7. Plug your robot in, turn it on, and click on “Connect” and “Detect Sensors.” If you get the message “port not set” click on “Refresh”
  8. Use the “add action” option to the right of each of the axes and digital buttons to configure their behavior.

You don’t need a lot of instructions, this is really easy to do. When you are done, click on “Run” which will download your code to the VEX IQ Brain.

Controller Express supports arcade and tank style driving, and allows you to configure any button. Click on the “Generated Code” button to see the Python code generated by Controller Express. If you want to edit the Python, click on My Projects, create a python project and copy this code from Controller Express into Python.

Good luck, and let us know if you have any questions.

The team uses ROBOTC to do the autonomous part but we haven’t been able to figure out the remote. Thanks in advance for any guidance.

The easiest way to let a motor run is to use one button to switch it on and one to switch it off. The code would look something like this:

while(true)
{
if(getJoystickValue(BtnEUp) == 1)
{
setMotor(intake, 100);
}
else if(getJoystickValue(BtnEDown) == 1)
{
setMotor(intake, 0);
}
}

So when you press E up, the motor starts at full speed and when you press E down, the motor sets to zero speed and stops.

Graphical version of the same below.

8727a799370eb61cb0221dd4120d75b5.png

THANKS!! We are still learning. This helps alot.

One of the great things included in RobotC are the sample programs. To access them, use File->Open Sample Program. There you will find many examples of functionality.

No problem. ROBOTC is really good - as curiousworx say, there is some excellent sample programs, although I don’t think there is one to do what you wanted on this occasion.
But, if you wanted to learn a bit about to code a sensor or how to use a particular type of loop, just go to the file menu and open a sample program.