|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
is it best to put the autonomous code in a SUB? or have it in the main loop? if it is in the main loop, how do you stop it from running if you aren't in autonomous mode? I read the article here:
http://www.combbat.com/programming/autonomous.shtml and I'd like to do my autonomous that way, but I just need to know where to put it. Thanks, manodrum |
|
#2
|
||||
|
||||
|
We did it in a subroutine. That way, all we had to do was return at the end and thus we made sure we didn't accidently have it do autonomous when we were supposed to drive.
|
|
#3
|
||||
|
||||
|
I put ours in a sub and every function on our robot was in a sub and I always call all the subs, but at the top of the autonomous I put an if statement like this. if auton_mode = 0 then Return . This canceled the sub if we where not in autonomous mode.
|
|
#4
|
|||
|
|||
|
3 bank software
Instead of using subs ... why don't you get the new version of P-basic and use multiple banks to switch between softwares.
It keeps it organized and its easy to use i.e. If auton_mode = 1 THEN run 2 ENDIF ... thats all it takes to switch between softwares .... if you have anymore questions about how to use it ... just e-mail me at robostangs548@hotmail.com |
|
#5
|
||||
|
||||
|
Multiple programs are nice but a program can be organized with subs. Multiple also works in the old version.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A better autonomous method.. | randomperson | Programming | 4 | 24-02-2004 18:02 |
| Electrical componenets for autonomous navigation | maclaren | Electrical | 10 | 18-12-2003 02:28 |
| crazy idea for autonomous | Mike Ciance | Programming | 16 | 24-04-2003 21:50 |
| autonomous mode problem on field | Chris_C | Programming | 17 | 26-03-2003 19:11 |
| Autonomous Kill Switch | UCGL_Guy | Programming | 8 | 15-01-2003 17:39 |