4

I recently got back into NXT stuff (keep in mind I have a NXT 1.0). My screen was broken, but I got it fixed. The software works, but I think the programming doesn't. I tried to make the motor move when I push a button. I downloaded it, and then all it did was jiggle the motor. I tried making a text block, but it didn't work - it just said "Run,Done" in a matter of a split second.

Help me! I really want to program stuff on my computer, and not just a 5 move thing on the NXT itself!

2
  • Could you please give us a picture of the program you tried? If you can't embed it in your post yet, please provide a link, we'll edit it in.
    – Joubarc
    Aug 11, 2013 at 9:21
  • For a Text Block, which displays text or images on the LCD panel, it is important the add a Wait Block after the Text Block, to give time to view the LCD panel before the program ends. Wait for 10 seconds should help.
    – dfrevert
    Nov 28, 2013 at 15:51

1 Answer 1

2

From your description, it seems you use a motor block which just tells the motor to start running. This works, but since your program then comes at an end, all motor activities are stopped immediately.

To solve this, you have to make sure your program doesn't terminate immediately. You could either use a wait block, with a fixed timer after which the program (and motors) will stop, or maybe a block to wait for another condition to happen (button pressed, sensor activated, number of rotations reached,...).

Another solution would be to change your motor block and use a "move" block - which instructs a motor to move for a certain time (the block wait for that time to be completed).

Keep in mind this is all from memory though, I may be wrong on the particulars; but in essence I'm confident your problem is due to your program terminating immediately.

3
  • It is the terminating which causes the problem. The easiest solution, which is not included in your answer, is to check the box "Wait till Completion" in the motor block.
    – Timtech
    Aug 30, 2013 at 15:26
  • Right, I didn't have access to the program so I forgot about that possibility
    – Joubarc
    Aug 31, 2013 at 6:01
  • Glad to be of assistance :)
    – Timtech
    Sep 1, 2013 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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