Arduino programming

Hi, I am fairly new with arduino. I have a indexer device that has a "Next" key on it which can be controlled by giving power input in a 8-pin mini DIN port. I already got a 8 pin mini DIN to USB cable, an elego arduino board and a usb host shield. What i need to do is, make a program in Visual Studio C++ that will controll the next key. As in when i press a button on my VS C++ program, it will activate the NEXT key and go to next step then stop. Any help would be very much appreciated. Thanks in advance

You have not provided nearly enough detail to be able to help you.

What is the purpose of the mini din to USB cable - is it something specifically manufactured for your "indexer device". What is it intended to connect to at each end? How are we supposed to know?

You need to post a link to the datasheet or user-manual for the indexer device.

What is the intended role of the USB Host shield?

What is the purpose of Visual Studio C++ - that is not the normal way to create an Arduino program.

A diagram of how the proposed system is intended to work would be a big help.

...R

Thanks you so much for replying. As I mentioned, I am fairly new. I could not figure out how to write the questions with enough detail. I apologize for that. Page 8 (highlighted area) of manual will give you a overview of the Indexer operation. I am also uploading an amateur level schematic of the system I want to have. Visual Studio C++ is important because I do not have labview. I only have Visual Studio available. Anything that would give me an interface with a press key would work for me.

Manual.pdf (1.19 MB)

Schematic.pdf (132 KB)

My very brief reading of the highlighted part of the manual suggests to me that you can control the indexer without needing any input from the keypad - just send step and direction signals to it with an Arduino. And you could use your Visual C++ program to make whatever sort of user interface your want and have it send a message to the Arduino which tells the Arduino how many steps to get the indexer to move.

That seems to me a lot easier than trying to intercept key-presses on the keypad.

As far as I can see the indexer is just a stepper motor driving a screw (probably a very carefully manufactured screw :slight_smile: ).

...R
Stepper Motor Basics
Simple Stepper Code

Serial Input Basics - simple reliable ways to receive data from your PC.

Here's the basic outline of what you will need to do:

When you VC++ program starts, you will need to connect to the arduino over the COM port (user configurable would be a good thing)

The VC++ program displays the UI which consists of a "Next" button. When the user clicks on it, the program sends a command over the COM port to the arduino

The arduino receives the command and toggles the control lines to make your indexer do what you want.

repeat as needed.

Thank you so much for your guidance