Answers.Body: <p>Thanks for the comments. I figured it out and the mistake was simple. I had two separate and independent program sequences each with its own start point in one program window. One sequence was for testing purpose to see if everything works and 
   the 2nd sequence was the actual driving block. As I am new to this setup, I guess one window should have just one program sequence.</p>
  
  <p>Once I deleted the test block and kept only the driving sequence, everything works fine. Posting this just in case some newbie might find it helpful in future.</p>
  
  <p>For the veterans, I hope my understanding is correct that in one window, there should be only one start point.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-12T01:26:47.490Z
Answers.LastActivityDate: 2020-02-12T01:26:47.490Z
Answers.UserDisplayName: user728650
Body: <p>I am building the race car mentioned in the <a href="https://rads.stackoverflow.com/amzn/click/com/1593275323" rel="nofollow noreferrer" rel="nofollow noreferrer">LEGO Mindstorms discovery book</a> using an EV3 brick.</p>
  
  <p>The problem I am facing is that the driving program runs fine when the brick is connected to the PC via USB. I can run it, I can use the remote control and test the car to steer, move back and forward as long as I like.</p>
  
  <p>However, once I transfer the program to the brick, and run it without PC, it responds to the remote only twice and then stops responding.</p>
  
  <p>This is very weird because if there was a problem in the program, it should not run in the first place even from PC directly, right?</p>
  
  <p>So I guess there is something wrong in my program when it gets transferred to the brick.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-10T10:31:17.260Z
Comments.Text: Hi and welcome to Bricks.SE! Just to be clear, have you checked for the usual suspects, like loose cables, near-empty batteries, etc? By "stops responding" do you mean there are no outputs at all, for any combination of inputs? Does the EV3 respond to pressing its own buttons, as opposed to those of the remote? Is the "only twice" part reliably repeatable, or is it "usually twice, but sometimes once or thrice"? What do you do that enables the next two responses? Can you test a program that waits for a remote button press and in response turns a motor and increases a number on the display?
Comments.UserDisplayName: zovits
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-10T15:20:30.920Z
Comments.Text: The difference between being connected to the PC and not is that the PC is constantly polling the EV3 for sensor values when it is connected, so it does change the timing of the program. Although I would not expect it to make a program "get stuck".
Comments.UserDisplayName: David Lechner
Tags: <ev3><mindstorms><programming>
Title: EV3 program runs fine when connected to PC but does not respond when copied to the brick
UserDisplayName: user728650
ThreadText: # EV3 program runs fine when connected to PC but does not respond when copied to the brick
  
  (Asked by: username_0 on 2020-02-10)
  
  I am building the race car mentioned in the [LEGO Mindstorms discovery book](https://rads.stackoverflow.com/amzn/click/com/1593275323) using an EV3 brick.
  
  The problem I am facing is that the driving program runs fine when the brick is connected to the PC via USB. I can run it, I can use the remote control and test the car to steer, move back and forward as long as I like.
  
  However, once I transfer the program to the brick, and run it without PC, it responds to the remote only twice and then stops responding.
  
  This is very weird because if there was a problem in the program, it should not run in the first place even from PC directly, right?
  
  So I guess there is something wrong in my program when it gets transferred to the brick.
  
  **Tags:** ev3, mindstorms, programming
  
  > **Comments:**
  > **username_1**: Hi and welcome to Bricks.SE! Just to be clear, have you checked for the usual suspects, like loose cables, near-empty batteries, etc? By "stops responding" do you mean there are no outputs at all, for any combination of inputs? Does the EV3 respond to pressing its own buttons, as opposed to those of the remote? Is the "only twice" part reliably repeatable, or is it "usually twice, but sometimes once or thrice"? What do you do that enables the next two responses? Can you test a program that waits for a remote button press and in response turns a motor and increases a number on the display?  
  > **username_2**: The difference between being connected to the PC and not is that the PC is constantly polling the EV3 for sensor values when it is connected, so it does change the timing of the program. Although I would not expect it to make a program "get stuck".  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-02-12. Score: 1
  
  Thanks for the comments. I figured it out and the mistake was simple. I had two separate and independent program sequences each with its own start point in one program window. One sequence was for testing purpose to see if everything works and
  the 2nd sequence was the actual driving block. As I am new to this setup, I guess one window should have just one program sequence.
  
  Once I deleted the test block and kept only the driving sequence, everything works fine. Posting this just in case some newbie might find it helpful in future.
  
  For the veterans, I hope my understanding is correct that in one window, there should be only one start point.
  
  
  ---
  
  