To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 882
881  |  883
Subject: 
Re: pbLua Beta 13c Sumo program
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 19 Aug 2007 19:48:15 GMT
Viewed: 
19779 times
  
Walt White wrote:
I posted earlier about my first impressions of pbLua Beta 13c and some
things I couldn't figure out, mainly having to do with numbers.  Ralph
Hempel promptly replied and some of the concepts are a bit over my head so I
decided I should just plow ahead with a simple application.  I have written
a simple sumo program.

That's a great idea. My kids worked on an RCX based sumo bot last year
in school, and just last week they were asking about using the NXT
and the new motors. Maybe it's time to build a robot instead of write
software all the time :-)

For this program, simple does not equal consise.  There are over two hundred
lines of code, mostly dealing with calibration and instructions for the
competitor and handling the fact that some arenas are black with a white
ring and some are white with a black ring.  Screen shots and the entire
program are available at
http://firstcoolbreeze.home.comcast.net/SumoSimple/SumoSimple.htm

I looked at this web page and program and have a few comments:

1. A lot of the code is there to provide prompts etc to the user. This
    is a good idea. I have not had too much time to think about reducing
    the space required for this. Most programmers are aware of the
    fact that the algorithm is the short part - the user interface
    is almost always a lot more code than you'd think!

2. A great deal of the logic is duplicated to handle white/black and
    black/white surfaces. Why not just invert the light sensor readings
    depending on the surface type. This would eliminate all the double
    logic.

3. In the end you resorted to using timed loops for turning the bot.
    When I build a sumo bot with the kids I'll figure out some example
    code and post it for everyone to see. The tacho functions are some
    of the most important advances the NXT makes over the RCX, so we
    should really learn to use them!

Thanks again for using pbLua, Walt. I love the way you send text
files from your Windows mobile phone to the NXT over Bluetooth!

I'll try and get the tacho stuff explained a bit better on the website
and post a link here.

Cheers, Ralph



Message is in Reply To:
  pbLua Beta 13c Sumo program
 
I posted earlier about my first impressions of pbLua Beta 13c and some things I couldn't figure out, mainly having to do with numbers. Ralph Hempel promptly replied and some of the concepts are a bit over my head so I decided I should just plow (...) (17 years ago, 19-Aug-07, to lugnet.robotics.nxt)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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