When compiled (see below), this program ppmex
allows you to send messages through the parallel port (DB25) on a Linux system,
via MATLAB or Octave.
In helloworld-test-compile-mex subdir, you will find helloworldMEX.c.
When, in MATLAB/Octave, you are in this folder, enter mex -O helloworldMEX.c
.
If the compilation is complet, you should have a new file such as helloworldMEX.mex*
When you have tested the compilation process (see above), simply type mex -O -v ppmex.c
in the root dir.
The warning about the line #21 extern int pport = 0;
is nothing to worry about.
When completed, a file ppmex.mex* should have been created.
ppmex('open') : opens the device, and get it ready to send messages
ppmex('write',message) : sends the message = {0, 1, 2, ..., 255} uint8
ppmex('close') : closes the device