Menu

What file to upload in nxt with NXT++! URGENT

Help
2007-07-23
2013-04-25
  • Nobody/Anonymous

    Hello,
    I have made the following program in XT++ and everything works but I DONT KNOW WHAT FILE TO UPLOAD IN the nxt tower (the tower needs a file compatible like .rxe and I do not have any of this. Any help appreciated!!!!!

    #include "NXT++.h"
    #include <windows.h>
    #include <iostream>
    using namespace std;

    int main()
    {
        int ls1,ls2;

        if(NXT::Open()) //initialize the NXT and continue if it succeeds
        {
       
                    NXT::Motor::SetForward(OUT_A, 50); //turn both motors on 50% power
          
            //NXT::Motor::GoTo( OUT_A,   10,    40, false )  ;
                     Wait(100); //wait 2 seconds
            NXT::Motor::Stop(OUT_A, false); //stop both motors with no braking
       

           
            NXT::Sensor::SetLight ( IN_3 , true);
            ls1 = NXT::Sensor::GetValue  ( IN_3 )  ;
            NXT::Sensor::SetLight( IN_1 , true);
            ls2 = NXT::Sensor::GetValue  ( IN_1 ) ;

            cout<<"IN_3: "<<ls1<<endl;
            cout<<"IN_1: "<<ls2<<endl;

            NXT::Close(); //close the NXT
        }
        return 0;
    }

     
    • Cory Walker

      Cory Walker - 2007-07-28

      You have gotten the whole idea of NXT++ wrong. NXT++ is not a way to make a program that the NXT can run. It is a way to remote control the NXT from any C++ program. To run that program, all you have to do is connect the NXT to the computer through USB. Once you have done this, you can run the program you compiled on your computer and it sends the commands to the NXT through USB. Note that you can also do the same with Bluetooth.

      Sorry about the delay. I am on vacation and nobody other than me seems to want to help out on the forums.

       

Log in to post a comment.