Help with input mode channel information capture in VB


I have a micro-maestro 6ch and I’m in the process of developing a simple Application; One Servo and one input channel in VB.

The idea is basically that: The servo operates a breaking pad over a turning wheel and the input channel is a snap action switch to measure/calculate the number and speed of wheel turns . Every turn of wheel will be a click in the snap action switch. Then number of clicks multiplied by the wheel diameter will allow me to calculate speed and distance.

I’m developing this application in VB for many reasons but mainly because this application is 90% UI (user interface) and VB is similar to other languages I learned when I was a developer several years ago.
At this point I can control the servo channel as I need in VB but I couldn’t deal on how to capture the information from the input channel in VB.
I want to add that I tested the input using a Maestro Control Center Script so I know the hardware a wire are ok.

All I need is a VB sample code to figure out what function to use and how to setup the parameters.

Thanks in advance.


Hello, Diego.

If you are using the Pololu USB Software Development Kit, the method you should look at is getVariables. There are several overloaded functions of getVariables each having entirely different definitions. Since we do not have a Visual Basic example using any of those methods, I recommend looking at the pololu-usb-sdk/Maestro/Usc/Usc.cs file and reading the descriptions for each getVariables function to figure out which is appropriate for your application. You should be able to find the Usc folder containing that file after downloading the Pololu USB SDK for the Maestro.

Also, one of our forum members posted their working Visual Basic .NET script for the Maestro using one of the getVariables functions, which could be helpful to you.

- Amanda