ROBOTC.net forums
http://www.robotc.net/forums/

Autonomous program not running correctly
http://www.robotc.net/forums/viewtopic.php?f=11&t=12447
Page 1 of 1

Author:  jjpugh [ Mon Nov 09, 2015 8:00 pm ]
Post subject:  Autonomous program not running correctly

Good evening. I am very new to vex and robotc. we are having problems getting an autonomous program to run on our swervebot. we have put it in the usb only mode and downloaded the code that I included. When the start switch is pressed the leds go red and one motor runs forward briefly and then the cortex waits for us to hit the button again and never runs the actual program. every once in a while it will run correctly and we have noticed when it does work, the leds stay green. Being new, we have tried many things but nothing ever helps. thanks

sorry, I guess program didn't attach

here is what we have programmed:
The start switch is in dgtl12
and the motors in port 2 and 3.

task main()
{
while(SensorValue(startswitch) == 0)
{}
motor(motor1L) = 127;
motor(motor1R) = -127;
wait(5);
}

Author:  Tabor473 [ Tue Nov 10, 2015 11:04 am ]
Post subject:  Re: Autonomous program not running correctly

So I tested out what you put here in a Virtual World without issue. Maybe upload the file or email it to me at gtabor@nrec.ri.cmu.edu.

Author:  JohnWatson [ Tue Nov 10, 2015 11:13 am ]
Post subject:  Re: Autonomous program not running correctly

Quote:
When the start switch is pressed the leds go red


To clarify with this, do you mean that the Robot/Game/VEXNet lights on the Cortex turn red, or that a VEX LED plugged into a digital port turns on?

If it is the former, then there may be a short in one of your sensors; try swapping out the touch sensor for another one and check for any frayed wires that could be causing the issue. Note that the red wire is not connected to a VEX Touch sensor by default, but if the white or black wires are frayed you could be running into the shorting issue.

If it is an LED (plugged into a digital port) that is turning on, then the problem may be with the port designations being used by your program and what is actually plugged into the Cortex. In this case, I suggest checking each port individually and ensuring that each motor and sensor is plugged into the correct port, and that this port assignment matches the port configuration of the program's Motors and Sensors Setup.

Author:  jjpugh [ Tue Nov 10, 2015 11:25 am ]
Post subject:  Re: Autonomous program not running correctly

it is the robot/game/vexnet leds. this problem is happening with multiple robots. we are running a total of 6 robots and this problem exist on 3 of them. when we look at what is different, there is not any difference. thanks!!

Author:  JohnWatson [ Tue Nov 10, 2015 5:53 pm ]
Post subject:  Re: Autonomous program not running correctly

Which version of ROBOTC is being used when you encounter these issues? You can find the version number under the 'Help -> About ROBOTC' menu option in ROBOTC; I don't recall any recent versions of ROBOTC/firmware having this particular issue, but an outdated build could cause undesired behaviors.

If the build is currently up to date (3.65 or 4.50, respectively), I suggest redownloading both the VEX Master firmware and the ROBOTC firmware; this can be done through the 'Robot -> Download Firmware -> Automatically Update VEX Cortex' option in ROBOTC.

Please let us know if the firmware reload resolved the issue and, if not, which version of ROBOTC is being used.

Author:  jjpugh [ Tue Nov 10, 2015 6:14 pm ]
Post subject:  Re: Autonomous program not running correctly

we are using version 4.5 with a build date of 1 sept 2015.

Author:  jjpugh [ Tue Nov 10, 2015 6:44 pm ]
Post subject:  Re: Autonomous program not running correctly

I did a firmware update, created a new file, typed the program and I still have the same issue. again we are using version 4.5. thanks!!

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/