I am just beginning the Summer of Learning Robotics course and am trying to complete the Labrynth and Robo 500 challenges. I am having trouble with the Virtual Worlds program being consistent. After I found a time value that made the robot turn exactly 90 degrees, I moved on and continued with the rest of the program. To my dismay, I discovered that the robot now turned to much, even though I hadn't done anything to that part of the code. I tried to correct, but every time I thought I had fixed it, the robot would over or under turn again. I also had problems with moving straight a consistent amount. When keeping the same time value, it would move forward to little or too much.

I have discovered that if I don't close the Virtual Worlds program between code changes, the drastic over and under turns weren't near as pronounced, although they were still there.

A few things. First, try not to have your robot move forward at 100% power. Basically, the robot moves in a very unreliable fashion when it is moving at full power. I always make an analogy with a baseball pitcher throwing a baseball. It is hard to locate a pitch that you throw at top speed. The same concept also applies to your turns. You can slow them down a touch and they will probably become a little more reliable.

Second, you are currently using timing (wait1Msec) to control the movements of your robot. As you progress through the ROBOTC Curriculum, you are going to learn more advanced ways to program your robot (using sensors and encoders, for example) that are much, much more reliable than timing. You are right, when programming your robot with timing, the robot does move unreliably. The thing is, this would also transfer over to a physical robot. Programming with wait1Msec commands isn't the most reliable. But, fear not, you are going to learn some more advanced ways in the very near future.

Your code looks good. You included a stop after each of your movements. Many people when they first start out make the mistake of not including those. I made that mistake often myself when I started.

For the Robo 500 challenge, my recommendation would be to first slow down. Also, make sure that you are going far enough ahead to give yourself a little more room for error on your turns.

You are off to a great start. Please don't be afraid to continue to use the forums as you progress.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum