2

I am building the race car mentioned in the LEGO Mindstorms discovery book 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.

| improve this question | | | | |
  • 2
    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? – zovits Feb 10 at 10:31
  • 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". – David Lechner Feb 10 at 15:20
0

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.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.