|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Test Autonomous Mode
We have fitted last year's robot with the new RC and are using the new OI so we can test while others build.
In reading the default code, I see that there is a value read in for PB_mode. Basically, I am not sure how we can test the robot in autonomous mode since we don't know how the PB_mode variable is changed. The reference guide says to set the Team number on the RC to zero. That doesn't make sense to me because I thought that number needs to be set to our team number for the competition. I would appreciate any help. John Luvera Team 637 |
|
#2
|
|||||
|
|||||
|
Take a look on IFI's web site under the Documentation section...there's instructions there as to how to create a new dongle which will let you switch autonomous mode on/off...
|
|
#3
|
|||||
|
|||||
|
autonomous mode is aliased as auton_mode in the code...
here's some code to try: if auton_mode = 1 then do_auto_stuff 'driver code here goto end_of_auto do_auto_stuff: 'auto code here end_of_auto: put that in the main loop... it's really basic and has no real value unless you have code to put in there...but it should help out a little *jeremy |
|
#4
|
|||
|
|||
|
You can still test your auton_mode code.... even with no Dongle.
Just set auton_mode equals 1 at the start of each loop, right after the serin. In your auton_mode service area, set the variables which are digital to zero, and the analogs to 127. Jump from the auton_mode servicing part to the Serout or to the tank drive in the USER program, so that the rest of the program won't process the auton_mode values, and let things go. If your robot resembles a hairy rabbit, pull the plug. Make a dongle soon, though. It's fun to watch the auton_mode switch from 1 to zero when the comp_mode (Kill switch) switches from 0 to 1. |
|
#5
|
|||
|
|||
|
one idea is to utilize the new code. use #if and #endif to only compile and download the autonomous code or the usercode. u can make the condition a #define statement or constant that u change whenever u want to test code. of course, this wont allow u to download auto and user code and switch without dowloading again, but at least u can test code. anyone know how to download programs into slots on the rc and then run different programs in different slots? or how to free up memory that is needed in auto mode but not in user mode?
|
|
#6
|
||||
|
||||
|
Autonomous Mode can be turned ON by setting the RC to Team 0 (zero).
|
|
#7
|
|||
|
|||
|
Work-around
Before we built a dongle, I just took an extra var (size = 1bit) and initialized it to 1. Then i'd have:
autom = 1 MainLoop: if autom (my var) = 0 then endauto if p1_sw_top = 1 then endauto goto endmainloop: autonomous code.... endauto: autom = 0 normal code.... endmainloop: serout(...) goto mainloop: That worked well enough, especially since it gave you a easily reachable kill-switch. Only thing to note is that if you use dead-reackoning, you need to tie the beginning of your autonomous code to another button, lest it run while the robot is disabled while the RC is not plugged in and your timer-count increase. |
|
#8
|
||||||
|
||||||
|
Re: Work-around
Quote:
|
|
#9
|
|||
|
|||
|
I was using this code before I had a dongle. The RC was always running in normal mode.
I would just flip on the bot, flip on the OI, and then hit the start button. It would still be sent. Otherwise, the robot would be counting pointlessly until the OI was flipped on, and you;'d get unpredictable results (like the robot running into a glass pane.) Since the bot never technically entered autonomous mode, it still recieves data from the OI. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming Autonomous mode | Jared Stofflett | Programming | 3 | 11-11-2003 09:32 |
| autonomous mode problem on field | Chris_C | Programming | 17 | 26-03-2003 19:11 |
| Autonomous mode | AntmanIV | General Forum | 1 | 17-02-2003 13:30 |
| autonomous mode timer | Don | Programming | 6 | 09-02-2003 22:16 |
| autonomous mode? | bigwalt | Technical Discussion | 1 | 21-01-2003 01:14 |