I am having trouble communicating with two 24v12 Simple Motor Controllers in C#.
I am trying to write a program in C# that will allow me to simply set the serial number and speed of the specific device at any time.
Basically this is what I would like to happen inside the program (no command line or external instructions).
1)Use a string to set the appropriate device(probably by serial no.)
2)Constantly be able to update the speed of that device at any moment
3)Do this for multiple motor controllers at the same time
For example:
//where SMC1 and SMC2 are objects (that I don't know how to set up yet??)
SMC1.serial = "1234...";
SMC2.serial ="5678...";
int A = 6;
int B = 3;
if(A > 5)
SMC1.speed(2000);
if (B<4)
SMC2.speed(1000)
//and then when desired later, I would like to update the speeds again (actually I'll be doing this constantly throughout the code)
I tried going through the provided examples: (Smc and SmcCmd and SmcExample1).
I know for sure that VS 2013 is set up correctly and that all the necessary references and classes (setting.cs, protocol.cs etc.) are there but I
just can’t get it to work with getting errors.
SmcSerialCWindows.c (pololu.com/docs/0J44/6.7.4) basically demonstrates exactly what I’m trying to do in C#:
What do I do to be able to simple set the serial number and then control the Motor Controllers via code only?