FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NXT motor not responding to buttons programmed to

Solved!
Go to solution
Solution
Accepted by webby

Hi Mathterizer,

The generated code is actually supposed to create the DC Motor block. This block can work with NXT Motors, TETRIX Motors, and MATRIX Motors as long as it is wired to right motor address constant. This is a change from 2010 when the DC Motor block only worked with the TETRIX motors.

For example, try the following simple programs and you will see that they have identical behavior.

Capture.PNG

This works because the MotorBlock has multiple implementations that swap in and out depending on what is wired to it. You can test this by double clicking the DC motor block to see the implementation. Depending on what Motor is wired to the block, you will see differerent subVIs open up.

Message 11 of 13
(1,349 Views)

Hi Webby,

From looking at your code, I'm pretty certain you were running into a compiler bug that prevented teleop code from responding to button actions when using TWO controllers. This should be fixed in the latest patch for NXT&MCT that mathterizer posted above. Good luck!

0 Kudos
Message 12 of 13
(1,349 Views)

ESearl:

Thank you, I look forward to trying that out. It's what we used to have to do, and since the 2012 was SO broken...I had no inclination to even try. Sounds like a great change.

0 Kudos
Message 13 of 13
(1,349 Views)