Subject:
|
Re: event driven vs. timing driven code...
|
Newsgroups:
|
lugnet.org.ca.rtltoronto
|
Date:
|
Sun, 19 Feb 2006 22:13:45 GMT
|
Viewed:
|
708 times
|
| |
| |
In lugnet.org.ca.rtltoronto, Chris Magno wrote:
|
David Koudys wrote:
|
K, most of my codeing for every competition has been based mostly on
timing--sure I had a few events, such as touch sensors and light sensors and
such, but when touch sensors were pressed, the code was to back up for x
seconds, rotate for x seconds, and continue on its merry...
However, for this competition, Im going (at least so far) on a pure event
driven code--do this until sensor is pressed, or do this until light value is
less than that...
I think in my entire code, I have one Wait command, and thats at the
beginning...
The problem arises, at least for me, is that Ive never done it this way
before. Im finding it difficult to account for the different events, and
getting them straight in my mind.
|
Welcome to MY world! thats how I have programed MOST of my bots, and
THATS the number one thing that bites me in the A..... arm.
you just CANT think of all the scenarios.
This is going to be a GREAT game.
|
I think Ive got a good grasp on it, but well see.
This is fun :)
Dave K
|
i am so impressed with your seek bot. that video was cool.
Chris
|
When using events I tend to use a state model, and use the events to switch the
state. So my main loop is:
repeat forever
if state 1
do stuff
if state 2
do stuff
if state 3
do stuff
and then have eternal tasks defining the state. Works OK, but you can still
get stuck in undefined states...
On the topics of video- I grabbed a quick one of my test bed crashing merrily
into a light.
http://www.youtube.com/?v=-lBpjQepZ28
-Rob A>
|
|
Message has 2 Replies: | | Re: event driven vs. timing driven code...
|
| Rob Antonishen wrote: ing the state. Works OK, but you can still (...) COOL!!!! i might just have to do a short video myself. it would seem that the "spin" idea works well. Rob, do you have other code that keeps it looking for the light after your (...) (19 years ago, 19-Feb-06, to lugnet.org.ca.rtltoronto)
|
Message is in Reply To:
| | Re: event driven vs. timing driven code...
|
| (...) Welcome to MY world! thats how I have programed MOST of my bots, and THATS the number one thing that bites me in the A..... arm. you just CANT think of all the scenarios. This is going to be a GREAT game. (...) i am so impressed with your seek (...) (19 years ago, 18-Feb-06, to lugnet.org.ca.rtltoronto)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|