|
With the number of bytes you are passing with RoboCon, 37, your main loop takes well over the 26ms between radio packets. You also put in a bunch of bytes for headers, etc. I like the use of control bytes to cover the 0xFF and 0x00 cases. I do something similar in as much as I serout/serin with timeout. I do not use a header or 0x00/0xFF checking as the micro doesn't care and the link seems pretty reliable.
One area I am having trouble with is every so often the basic stamp loses one (or more, there is no way to tell) charactors and times out of the serin. I am struggling to figure that one out. One packet every couple seconds probably isn't worth too much effort, but I do want to understand why. Re-synching is't a problem as the co-processor is already waiting for the next packet when the basic stamp times out. So far the co-processor always gets it's packet w/o error.
Cheers!
|