×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Linking to external c++ stepper motor library to compile DIY telescope driver?

  • Posts: 2
  • Thank you received: 0
Hi INDI friends,
I am an INDI and Stellarmate fan and beginner, and I am trying to write my first driver for a DIY go-to mount. This is also my first post to the forum, so I apologize if this is not the right place for it, and for the basic/ignorant basic question.

I was able to follow all the steps in the very helpful INDI technical documentation:
docs.indilib.org/drivers/project-setup.html
It was super clear and detailed, thank you for it! I now need my telescope driver to control my stepper motors, via a Pololu Tic board, which comes with a very complete C++ library (as well as a command line tool, C, Python and Ruby libraries).

I have no trouble controlling my stepper motors with the standalone C++ code example here
www.pololu.com/docs/0J71/12.11
which simply includes the "tic.hpp" header file with
#include <tic.hpp>
and successfully compiles as
g++ code.cpp $(pkg-config libpololu-tic-1 --cflags --libs)

However, I do not know how to do the same linking in my INDI driver. I assume I should modify the file "CMakeLists.txt" and create a "FindTIC.cmake" file in the directory cmake_modules? I do not know cmake and am unsure how to do this. Would anyone have advice for me on how to do this?

On this forum, I found this awesome DIY focuser which also uses a Pololu Tic stepper motor controller:
indilib.org/forum/wish-list/12026-ticfocuser-ng.html#84682
but I wasn't able to figure out from the code how this was solved there.

I'm attaching photos of my DIY go-to mount prototype :) Thank you for reading and for any help or thoughts you may have! Happy holidays!

1 year 3 months ago #89288
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
I learned some CMake and Make, and solved my problem. I thought I would post my solution here, in case anyone else is interested in using a Pololu Tic circuit board to control a stepper motor with INDI. I added a FindPololuTic.cmake file and updated the CMakeLists.txt, see the files attached.
Happy making and clear skies!

File Attachment:

File Name: CMakeLists...1-06.txt
File Size:2 KB

File Attachment:

File Name: FindPololu...1-06.txt
File Size:2 KB
Last edit: 1 year 3 months ago by Emmanuel Schaan.
1 year 3 months ago #89472
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.591 seconds