Jump to content

Austin71

Members
  • Gesamte Inhalte

    6
  • Benutzer seit

  • Letzter Besuch

Austin71's Achievements

Newbie

Newbie (1/14)

0

Reputation in der Community

  1. Is it customary and proper to execute stepper_enable() each time before moving a stepper motor, then call stepper_disable() after each move? Or is it better to enable the stepper when the overall process is started, make all desired moves, and then disable the stepper when finished? What exactly is happening with the enable/disable functionality? Thank you.
  2. Fantastic, thanks very much. I thought the disable instruction was not enough, and I even looked for a destroy command but somehow missed it. My fault. All's well now and we are off and running. At least until the next question!
  3. Can I ask a follow up question? Your suggestion worked and we are now able to run the stepper motor. However, when execution of the following test block is finished, I have memory leaks. Obviously, this block doesn't do anything except connect and release, but I wanted to isolate the memory leak problem: --------------------- IPConnection ipcon; ipcon_create(&ipcon); Stepper stepper; stepper_create(&stepper, UID, &ipcon); stepper_disable(&stepper); ipcon_destroy(&ipcon); --------------------- My output windows shows: Detected memory leaks! Dumping objects -> {586} normal block at 0x006E50C0, 4248 bytes long. Data: < 5 6n > 01 00 00 00 20 35 F6 C0 E0 36 6E 00 02 00 00 CD Object dump complete. Thank you for any advice.
  4. I am creating a C++/MFC program to run the stepper motor. I have included "ws2_32.lib" and "advapi32.lib" in the project properties (linker additional dependencies). I am using the following defines: #define HOST "localhost" #define PORT 4223 #define UID "5W5jBJ" // Obtained from running brick viewer I am using the following code, taken from the example code: // Create IP connection IPConnection ipcon; ipcon_create(&ipcon); // Create device object Stepper stepper; stepper_create(&stepper, UID, &ipcon); // Connect to brickd if (ipcon_connect(&ipcon, HOST, PORT) < 0) { //returns -4 } Everything compiles fine, but I can't connect. I have loaded the brickd drivers for the stepper motor, and I can connect and run the stepper motor using brick viewer. Any clues as to what I may be doing wrong? Thanks.
  5. Yes you are right of course regarding the deprecation status. The new file compiles without any issues. Thanks very much.
  6. Friends: I'm completely new to Tinkerforge, forgive my ignorance. When attempting to compile a solution using Visual Studio 2015, I get several compiler errors in the file ip_connection.c, which for my project I have renamed ip_connection.cpp. All of the errors relate to use of deprecated terms or string functions which have been declared unsafe. Is there a newer version of these files? Any other remedies? Thanks.
×
×
  • Neu erstellen...