To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.ca.rtltorontoOpen lugnet.org.ca.rtltoronto in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / Canada / rtlToronto / 15704
15703  |  15705
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, I’m 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 that’s at the beginning...

The problem arises, at least for me, is that I’ve never done it this way before. I’m 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 I’ve got a good grasp on it, but we’ll 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)
  Re: event driven vs. timing driven code...
 
In lugnet.org.ca.rtltoronto, Rob Antonishen wrote: <snip> (...) That's a beautiful vid! I think this is gonna be a great competition... (19 years ago, 20-Feb-06, to lugnet.org.ca.rtltoronto, FTX)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR