<< mdaqEncoderRead Data acquisition mdaqLEDWrite >>

MicroDAQ Support Package for Matlab/Simulink >> MicroDAQ Support Package for Matlab/Simulink > Data acquisition > mdaqKeyRead

mdaqKeyRead

Reads MicroDAQ function key state

Calling Sequence

state = mdaqKeyRead(functionKey)

Description

This function reads MicroDAQ function key (F1, F2) state.

Input arguments

Output arguments

Examples

disp('Press MicroDAQ F1 to stop...')
ledState = true;
while mdaqKeyRead(1) == false
    % keep led blinking until F1 isn't pressed
    mdaqLEDWrite(1, ~ledState);
    pause(0.1); 
    ledState = ~ledState;
end
mdaqLEDWrite(1, 0)

See Also


Report an issue
<< mdaqEncoderRead Data acquisition mdaqLEDWrite >>