Joe Smith

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Sonar Sensor with C++ Library (NXT) #5363
    Author Image
    Joe Smith
    Participant

    hmm i guess i’ll just stick with c++ and get myself a bluetooth dongle instead ^^
    i doubt it’ll be good to mix another ‘seemingly similar’ language into my very slowly growing c++ knowledge.

    but thanks for the help, anyway.

    (and should i ever delve deeper into the code and find out whats not working with the network thingy, i’ll drop you a note 🙂 )

    thanks again

    Joe

    in reply to: Sonar Sensor with C++ Library (NXT) #5355
    Author Image
    Joe Smith
    Participant

    Hi 🙂

    Funny thing is, i don’t really know enough about how to use that.
    from my (rather amateurish) point of view, thats c# and not useable by someone like me who pretty much knows nothing about programming languages other than c++. 🙂

    and since i’m really nothing more than a dabbling hobbyist, i have no real clue about how to use dll’s or anything, which is bothersome, but i hardly find time to further my knowledge about programming.

    sorry for all the trouble

    Joe

    in reply to: Sonar Sensor with C++ Library (NXT) #5343
    Author Image
    Joe Smith
    Participant

    Not sure how that would work.
    i mean, the original software connects over usb just fine, but in the c++ library i only see network or bluetooth as available connection types.

    is there a way to connect via usb without the tunnel?

    in reply to: Sonar Sensor with C++ Library (NXT) #5338
    Author Image
    Joe Smith
    Participant

    indeed. it works via Bluetooth, but not in this setting:

    the nxt is connected via usb to the pc.
    the pc runs both the program and the tunnel, with the program using the ip 127.0.0.1 to connect
    so its… over a network connection, without a ‘real’ network, so to speak.

    thanks again for the helping hand ^^
    Joe

    in reply to: Sonar Sensor with C++ Library (NXT) #5318
    Author Image
    Joe Smith
    Participant

    And me again.
    I have some results to share:

    I borrowed a bluetooth dongle from a coworker and it works quite fine, no problems whatsoever.

    so, in conclusion, it could be either the tunnel or the network-part thats acting up.

    since that bluetooth isn’t mine, though, i still could do with a solution 🙂

    thanks in advance, etc.

    best regards
    Joe

    in reply to: Sonar Sensor with C++ Library (NXT) #5317
    Author Image
    Joe Smith
    Participant

    Thanks for the reply.

    Sadly, it didn’t help.

    a) i moved the construction of the sensors and motor inside the try-brackets, with the sensor3 directly followed by its init(), which just resulted in the same error occuring after the 500 ms delay defined in the i2c.h

    b) i tried both setups without the tunnel, which runs, but complains:

    E
    error code 352
    error type 1
    in Function “send” in class “Nxt_network”

    when the program tries to execute the line:

    "connection->connect(1500, "127.0.0.1");"

    which i guess means it can’t find the nxt without the tunnel. Sadly i can’t try it with bluetooth, as i don’t have a bluetooth connecting-thingy anywhere.

    interesting sidenote:
    the problem seems to be created by the Read()-commands, as the init() command runs fine, when i change the init()function in sonar.cpp from

    void Sonar::init(bool reply){
      I2c::init(reply);
      read();
      read();
      off();
      this->has_init=true;
    }

    to

    void Sonar::init(bool reply){
      I2c::init(reply);
      //read();
      //read();
      off();
      this->has_init=true;
    }

    after this change, the error occurs after the touch-sensor press again, when the read-command is executed.
    (i might be wrong, however, since, maybe, the init() fails without anyone noticing, preventing the read() from working afterwards, simply because the sensor is not initialised?

    anyway, it doesn’t work with init(true) either, same error message, which i guess means that the initialisation works fine, as the ‘true’ would mean that the nxt responds?

    sorry for the wordyness and thanks again

    Joe

Viewing 6 posts - 1 through 6 (of 6 total)
Posted in

Make a donation