Module: miob1

MIOB1 is only available on devices that contains an MIOB1 I/O expansion board, such as AXM-UP3292 and AXM-UP3500. MIOB1 is the object returned when the plugin is loaded. It contains other objects that can be used to access the hardware on the I/O board.

The following hardware is provided on an miob1 board:

The name of the plugin for loading is 'miob1'. The generic name 'hw' can also be used, which will load the plugin for any I/O board. The application may then need to use miob1.MIOB1#type to determine which plugin has been loaded. When loaded, a single miob1.MIOB1 object is returned.



var hw = $wat.load('hw')[0];
// Toggles the third output.
// Switches the fifth LED to Green.
var led = hw.leds[4];
led.color = led.Color.Green;
// Toggles the Blue light on the internal stacklight.
var sl = hw.istacklight;
// Changes the color of the second LED to Green but only if it is currently Red.
var led = hw.leds[1];
if(led.color == led.Color.Red)
   led.color = led.Color.Green;