locked
Nxt and VPL RRS feed

  • Question

  • Hello everyone,

    I'm currently on a project for my last year in highschool, and I have many problems. I use a robot nxt with VPL from Microsoft robotic.

    The robot nxt has 4 wheel, and have two motor: a motor for the direction and an other motor to advance (I think it calls "directional driving" ? x) ).

    I've just edited the VPL tutorial 4 (by replacing the "differential drive" by "motor ntx"), and use the directional dialog with "button release", but I have a problem... : 

    I canuse thedirectional driveronly when the robot is moving (forward or backward). But to direct the robot in any direction, I have to press the button forward or backward in order to run it, but I can not press both buttons simultaneously x)

    I wondered if there is a way to use keyboard (with the directionnal tuches) to move the robot?


    I also wondered if we can use a joystick or ... is it too difficult to make it?

    Thank you for taking the time for read! (and sorry for my bad english~~)




    • Edited by Kannara Monday, March 19, 2012 6:21 PM mistake
    Monday, March 19, 2012 3:59 PM

Answers

  • For #2

    When you add the xbox controller to you diagram you will see that you can connect notifications to whatever behavior you want (just like you have for the desktopJoystic and Game controller.

    I would use one of the xbox controller buttons to controll the drive motor...
    * Button-press starts the drive motor, button-release stops the drive motor.
    * Joystick to control the rotation of the other motor.  Respond to the "...ThumbstickChanged" notification and use a "Calculate" activity box to translate the x position of the thumbstick to a value that corresponds to the angle you want.  (you need to experiment with the values to get the right relationship)

    • Proposed as answer by Gershon Parent Monday, March 26, 2012 9:41 PM
    • Marked as answer by Kannara Tuesday, March 27, 2012 7:38 PM
    Monday, March 26, 2012 9:40 PM

All replies