Instrument control package: Difference between revisions
Jump to navigation
Jump to search
→Compatibility
Line 43: | Line 43: | ||
{{Code|Check for interface support|<syntaxhighlight lang="octave" style="font-size:13px"> | {{Code|Check for interface support|<syntaxhighlight lang="octave" style="font-size:13px"> | ||
pkg load instrument-control | pkg load instrument-control | ||
supportedinterfaces = instrhwinfo().SupportedInterfaces | |||
if ( | if ! isempty(strfind (supportedinterfaces , "serial")) | ||
disp("Serial: Supported") | disp("Serial: Supported") | ||
else | else | ||
Line 51: | Line 52: | ||
#similarly with: | #similarly with: | ||
# | # ! isempty(strfind (supportedinterfaces , "parallel")) | ||
# | # ! isempty(strfind (supportedinterfaces , "i2c")) | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||