This page is deprecated; the new home of this documentation is at ASI Gamepad Plugin
ASI Gamepad is a Micro-Manager plugin that adds support for an XBox Gamepad. It lets users assign device properties to thumb sticks and Beanshell scripts to button presses. It is part of Micro-Manager 1.4.x builds as of 24-Oct-2018 and can be found in the menu Plugins > Device Control > ASI Gamepad. To our knowledge it has not yet been ported to MM 2.0; any help doing so would be greatly appreciated.
The controller/gamepad isn't added thru the hardware config wizard , instead the plugin when launched looks for it. Then it displays the message “GamePad:NOT Found”,“..FOUND”,“..Connecting” and “..Error Connecting” accordingly.
If you already have the gamepad paired, press the HOME button. The button lights up, blinks a few times and once its connected to the PC it glows solid. Moments later the plugin will update the status to “GamePad:Found”
The button and joystick assignments aren't automatically saved by the plugin between session , so use these buttons to save and load all thumb stick and button assignments.
Axes are analog controls on the gamepad.
Using the axis assignment table user can pick a device and device property that is adjusted when the axis is moved.
A common use of these controls is to move a stage. For this assign the axis to a stage's vector move property. In the case of an ASI's XYstage the property “VectorMoveX-VE(mm/s)” and “VectorMoveY-VE(mm/s)” are appropriate. They accept input in mm/sec and typical max value for the property is 4-5mm/sec. So here the multiplier column comes handy, when a multiplier of 3 is picked. Then the thumbstick deflection which varies from +1 to -1 , turns into +3 to -3 , and when applied to the device property , the stage will move +3 mm/sec to -3 mm/sec.
Unlike the axes controls, buttons have only two states, pressed or unpressed. The Action column of the Button assignment table lets user pick from a list of predefined actions (like Snap, Live view toggle etc) or “Run_Beanshell_script” to specify a beanshell script to be run on the button press. The path to the script is specified with the 3rd column. Clicking on it displays a File Chooser dialog box and user can navigate and pick the script to run.
A common way to setup the DPAD would be to move a stage on presses. For this make 4 different beanshell scripts with the following codes gui.setRelativeXYStagePosition(X# in um,Y# in um); each with a different move and assign them to the DPAD buttons like this:
gui.setRelativeXYStagePosition(1000,0);
gui.setRelativeXYStagePosition(-1000,0);
gui.setRelativeXYStagePosition(0,1000);
gui.setRelativeXYStagePosition(0,-1000);
For example scripts click here
The source code is BSD licensed and can be found on the Micro-Manager 2.0 Github.