Instrument control package: Difference between revisions

m
draft
m (moved Instrument control to Instrument control package: forgot to add the package word)
m (draft)
Line 1: Line 1:
This is the wiki page of the package instrument-control
Package for interfacing the outside world of hardware via Serial, i2c or Parallel interfaces.
 
= Examples =
== Serial ==
=== Configuring interface ===
You might want to configure interface in a loopback mode for testing.
* If you have a Serial adapter, then simply connect pins 3 (Tx) and 2 (Rx) together (assuming your adapter is [http://en.wikipedia.org/wiki/File:DE9_D-subminiature_RS-232_pinout.png RS-232 DE9], otherwise check before doing anything). One can also insert an LED in series to view the actual bitstream.
* If you do not have a Serial adapter then create a virtual port using:
<pre>
# socat PTY,link=/dev/ttyS15 PTY,link=/dev/ttyS16
</pre>
 
which will open two interconnected interfaces, where one (e.g. /dev/ttyS15) can be opened in Octave and second (e.g. /dev/ttyS16) using something like GNU screen:
<pre>
$ screen /dev/ttyS16 <baudrate>
</pre>
 
do not forget to change interface permissions if you want to use them with Octave/screen without root privileges.
 
=== Opening and closing the interface ===
=== Configuring open interface ===
=== srl_read() Timeout ===
 
== Parallel ==
parallel
 
== i2c ==
i2c


[[Category:OctaveForge]]
[[Category:OctaveForge]]
[[Category:Packages]]
[[Category:Packages]]
10

edits