Jun 15, 2007

Sample Page from Idea Book - Debug chapter


Our Idea Book doesn't contain just building and programming instructions for robots. We've also tossed in about 8+ chapters (I call them "theory" chapters - you can call them what you like) that cover various topics related to NXT robotics.


In addition to contributing a robot to the book, I've also written an introductory chapter on debugging programs. I introduce various methods that can be used in a pesky NXT-G program to help you track down bugs and fix issues. I provide sample programs that demonstrate how to use blocks such as the Sound block and Wait block (and a few others) with your debugging efforts.


4 comments:

Dean Hystad said...

My daughter came up with an idea that I thougt was pretty clever (maybe I'm a bit biased). She made a debug MyBlock that waited for a set period of time (it could have also been a wait for sensor). These were liberally sprinkled throughout their FLL mission programs.

When everything worked she changed the Debug MyBlock to effectively do a No Op and turned off debugging without having to touch any of her programs.

Jim Kelly said...

Sounds like you've got a programmer on your hands!

Jim

Brian Davis said...

That's a very good idea! I've done that with a MyBlock that referenced a variable, either beeping or not beeping depending on how the variable was set... but ironicly I never thought to just recode the MyBlock to a NOP. Kudos for a great solution!!

--
Brian "and a child shall lead them" Davis

Eric D. Burdo said...

Jim... time to update your chapter! :)

Dean, tell your daughter that was a great solution. Ask her if she'd like to write up something about it. I think we could post it as a helpful hint here on the site.

Related Posts Plugin for WordPress, Blogger...