Announcement

Collapse
No announcement yet.

loop not stopping when downloaded

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • loop not stopping when downloaded

    I am new to ev3 programming and have hit a problem I do not understand:
    I have a very simple program to demonstrate the loop function, the robot moves forward for 1sec ahd then turns right. I put forward and turn blocks inside a loop block and set the count condition to 4. When I run this from the programming interface over a USB cable, the robot moves around a square and stops. When I download the code to the ev3 brick and untether the robot, and press the run button, it keeps going! I had not expected different behaviour when I ran the code on the brick. What have I done or not done wrong?

  • #2
    EV3 programs run the same way, tethered or untethered, started from computer or brick EXCEPT for one thing. Downloading a program resets sensors so they are reset before your program starts. When running from the brick this does not happen. Sensors are always reset at the start of a program, but this takes a liny amount of time and I have some programs that run differently when I add a 0.1 second wait block at the very start.

    I don't think is your problem but cannot be sure without seeing the code. More likely you are running the wrong program on the brick. Add a block to make a sound and try again. Do you hear the dound when running from the brick? If not you are doing somerhing I see happen all the time; running a different program with a similar name or from a different project.
    Last edited by Dean Hystad; 10-03-2019, 10:11 AM.

    Comment


    • #3
      I have had groups have the same issue, where it would run when tethered and not when it wasn't. After spending a while trying everything I could the first time it happened, I finally realized what it was. They had two folders with a program named "program" in it and they were running the wrong one. I know it seems simple, but that could be your problem.

      Comment


      • #4
        My kids and I worked for 20 minutes to find a bug in their code today... Turned out to be operator error. Good luck figuring it out.

        Comment


        • #5
          Originally posted by Tim Carey View Post
          My kids and I worked for 20 minutes to find a bug in their code today... Turned out to be operator error. Good luck figuring it out.
          No such thing as operator error in FLL. All things attributed to operator error are design errors. Maybe thats not entirely true, but it is s good philosophy. Make the robot responsible for doing things correctly and rely on skilled operators as little as possible. When a mission fails because of a setup error instead of thinking how to prevent that mistake from happening again, think of what the robot can do to compensate.

          Long debug times are often a symptom of looking at the computer instead of looking at the situation and thinking. A lot of time is spent solving problems that don't exist. Instead of punching the back button right away, try to identify what part of the program is running, think about what should be happening, and compare to what is happening.
          Last edited by Dean Hystad; 10-03-2019, 09:37 PM.

          Comment

          Working...
          X