Pololu Maestro VB programming- select default controller

Hi, I am doing some VB.net programming for use on several Pololu Maestro’s. I need to be able to switch by serial number and use just that controller. I see some reference in the code but perhaps a small example as I’m not following it.

Hello.

It sounds like you might be referring to code from our USB Software Development Kit. There are some comments in “MainWindow.vb” (which is part of MaestroEasyExampleVb) with some code showing how you can specify a serial number for the device.

If that does not answer your question, could you be more specific about what you are having problems with and what code you were referencing?

Brandon

What I am trying to do is have several controllers and the VB program I am writing will be able to access the controller by selecting which one to send the signals to. I am talking about USB Software Development Kit.
The code you mentioned is what I was referring to as it mentioned multiple devices but I do not understand the example provided. Thats why a nice sample code of how to switch the a particular device
would be nice.

’ If you have multiple devices connected and want to select a particular
’ device by serial number, you could simply add some code like this:
’ If dli.serialNumber <> “00012345” Then
’ Continue For
’ End If

The snippet of code you posted serves as an example. All you have to do is remove the comment tags at the beginning of the last 3 lines, and replace the serial number with the one you want to connect to.

Brandon

Thanks.That seems to work for 1 controller. How would I go about making it work for multiple devices?

You can use the same method to connect to multiple Maestros based on the serial number you specify. There are multiple ways you could handle this in your code. For example, you could edit the functions so they accept a serial number (or a variable that controls which serial number to use) as an argument.

Brandon

Thanks, I got it working following your suggestions.