|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Need some order in programming!
I've run into a bit of a pickle with my coding... When writing programs for stuff like joysticks etc, it's fine if the program runs every time the microprocessor refreshes(actually that's a good thing!). However, what if you don't want that to happen? An example in autonomous mode: you want to take a reference bearing with a digital compass at the beginning of the game. How do you prevent the robot from getting a new "first bearing" every time the processor loops? Or how about ordered events? If I want the robot to drive forward for a certain amount of time and then extend the arm, how do I prevent it from driving forward if it's already done so (when the processor refreshes)?
Is there some way to carefully control when pieces of code are carried out? Perhaps static integers or "do while" loops (Initialize integer an integer at 0. If you carry out the enclosed piece of code, mark the integer as a 1-so it won't repeat...)? Help! ![]() |
|
#2
|
||||
|
||||
|
Re: Need some order in programming!
Quote:
-Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming - Getting Started | Mark McLeod | Programming | 80 | 16-04-2008 23:37 |
| Organizing a programming team. | scitobor 617 | Programming | 7 | 28-01-2005 19:18 |
| Programming Code | themaxim | Programming | 10 | 07-01-2005 13:07 |
| Robot Programming Education | phrontist | Programming | 11 | 03-05-2004 07:32 |
| Using an Operator Interface with the 2004 EDU RC wirelessly | Dave Flowerday | Robotics Education and Curriculum | 34 | 19-04-2004 19:06 |