| Author |
Message |
|
Jon_T
Rookie
Joined: Fri Oct 09, 2009 9:21 am Posts: 28
|
 VRC Competition
I see in the sample programs there is a competetion template. Are there any directions anywere on how to use it?
Also with Easyc, you could put in jumpers to run either autonomous or driver control to test each out, does Robot C have anything like this?
Thanks, Jon T
_________________ Jon Thompson Coach - Twisted Bots VRC 177
|
| Fri Oct 09, 2009 9:28 am |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: VRC Competition
Hi Jon, There's a whole "Competition Control" section of the help documentation included with ROBOTC. Here's a link to the web version: http://www.robotc.net/ifi_webhelp/scr/f ... ontrol.htmAlso, the VEX Competition documentation has a whole section on programming, specifically explaining how to use the templates: http://www.vexrobotics.com/docs/vex-ele ... 082008.zipThey didn't seem to post it this year, so I found the link to last year's documenation. Hope this helps. Please let us know if you need anything else. - Tim
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Fri Oct 09, 2009 12:35 pm |
|
 |
|
Jon_T
Rookie
Joined: Fri Oct 09, 2009 9:21 am Posts: 28
|
 Re: VRC Competition
We've now tried the template. The autonomous runs, but the teleop doesn't. Any ideas what we are doing wrong?
Thanks, Jon T VRC 177
_________________ Jon Thompson Coach - Twisted Bots VRC 177
|
| Sun Oct 11, 2009 5:31 pm |
|
 |
|
Jon_T
Rookie
Joined: Fri Oct 09, 2009 9:21 am Posts: 28
|
 Re: VRC Competition
After downloading the Master code, user control now works.
For the template included in Robot c v 1.7, it isn't obvious to me where to put the user control code. I ended up commenting out everything that is there and adding my own always true loop. It seem like most of the code is written for an lcd screen or something?
Thanks, Jon T VRC 177
_________________ Jon Thompson Coach - Twisted Bots VRC 177
|
| Sun Oct 11, 2009 8:42 pm |
|
 |
|
cabbagekid2
Rookie
Joined: Sun Oct 11, 2009 7:01 pm Posts: 4
|
 Re: VRC Competition
Hey Jon,
Are you using crystals or VEXnet?
|
| Mon Oct 12, 2009 6:25 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: VRC Competition
The VEXnet requires a hardware switcher in order to test competition modes. You can see the hardware switcher here: http://www.vexrobotics.com/vex-competitions.shtmlP/N: 276-2335 VEXnet Competition Switch $19.99 ea We're working on a ROBOTC Update that will let you emulate this over the Orange serial cable plugging into the VEXnet transmitter. This should be available in a few days.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Tue Oct 13, 2009 11:38 am |
|
 |
|
Jon_T
Rookie
Joined: Fri Oct 09, 2009 9:21 am Posts: 28
|
 Re: VRC Competition
We have ordered the VEXNet, but it hasn't arrived yet. We have the switch but it does no good without VEXNet. We are using v1.70 hoping that the VEXNet arrives before our competition. Currently we are using crystals.
Do all the following lines from the template have to do with the VEXNet or what? Where exactly would I put our code?
//User control code here, inside the loop
clearLCDLine(0); clearLCDLine(1); displayLCDPos(0, 0); displayNextLCDString("Teleop "); ++nTeleopCycles; displayNextLCDNumber(nTeleopCycles, 4);
for (nTime = 0; true; ++nTime) { displayLCDPos(1, 0); if (bIfiRobotDisabled) displayNextLCDString("Disable "); else displayNextLCDString("Enable "); displayNextLCDNumber(nTime / 600, 2); displayNextLCDChar(':'); displayNextLCDNumber((nTime / 10) % 60, -2); displayNextLCDChar('.'); displayNextLCDNumber(nTime % 10, 1); wait1Msec(100); }
Thanks, Jon T VRC 177
_________________ Jon Thompson Coach - Twisted Bots VRC 177
|
| Wed Oct 14, 2009 1:26 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: VRC Competition
You're programming in the wrong file. You need to place the includes file into the ROBOTC Includes directory. The file you want to use looks more like this:
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Thu Oct 15, 2009 10:01 am |
|
 |
|
Jon_T
Rookie
Joined: Fri Oct 09, 2009 9:21 am Posts: 28
|
 Re: VRC Competition
Success!!! We were able to install VEXNet and get Autonomous and Driver control to work last night. We installed the VEX WiFi Master Code Ver 8 from here: http://www.vexrobotics.com/vex-robotics-downloads.shtmlWe then downloaded and installed Vex Competition Includes.c and the Vex Competition Template.c into RobotC v 1.7 from this thread: viewtopic.php?f=11&t=1877We then updated VEX User Code firmware with the latest version found in RobotC v 1.7. Next we added our autonomous and driver control to the new competition template and downloaded it to the robot. Next we turned the VEX off and on. We installed the cable from the Vex Competition switch. Using the competion switch toggle between autonomous & operator control mode and enable/disable the modes. We did find that you had to run autonomous (at least for a short time) to run driver control. Jon T
_________________ Jon Thompson Coach - Twisted Bots VRC 177
|
| Fri Oct 16, 2009 10:21 am |
|
 |
|
Jon_T
Rookie
Joined: Fri Oct 09, 2009 9:21 am Posts: 28
|
 Re: VRC Competition
I've now upgraded to 1.97 and everything is pretty much working. I have 2 questions though.
1) When we run the competition template, the autonomous stops at 20 seconds, but the driver control runs well past 2:00. Is this normal?
2) The robot light is always red, never green. I don't know if this is a RobotC issue or a VEX issue?
Thanks,
_________________ Jon Thompson Coach - Twisted Bots VRC 177
|
| Wed Oct 21, 2009 1:30 pm |
|
|