2 summary:: pattern that polls values from a human device interface, based on an indexed slot
3 related:: Classes/Phid, Classes/PhidKey, Classes/GeneralHID
4 categories:: Streams-Patterns-Events>Patterns>User Input
11 index pointing to a slot like a button or an axis.
14 index pointing to the type of slot (see link::Classes/GeneralHID:: for a description of this).
17 a link::Classes/GeneralHIDDevice::, or an element from the code::GeneralHID.deviceList::, which will then be opened by the pattern.
20 number of values to return.
25 // build the device list and start the event loop:
26 GeneralHID.buildDeviceList;
27 GeneralHID.startEventLoop;
29 // find an Impact game device and open it:
30 a = GeneralHID.open( GeneralHID.findBy( 1973 ) );
32 // inspect the capabilities of this device:
40 \degree, ( PhidSlot( 0, 3, a, inf )*12 ).round(1),
46 // more complex example, showing multichannel expansion and sequences of slots:
49 \degree, ( PhidSlot( Pseq([[0,1],2,5],inf), 3, a, inf )*12 ).round(1),
53 // the type argument can also be replaced by an Array or pattern.
55 // clean up: close the device and stop the eventloop
57 GeneralHID.stopEventLoop;