Hardware Reference
In-Depth Information
31347.594 1
31347.594 0 0.734
31347.594 0
31349.110 0
When the -g option is used, three lines are produced for each event:
Time of prior event, with previous state
Time of current event, with previous state
Time of current event, with current state, with time lapse in
column 3
If gnuplot is absent, you can install it on your Raspberry Pi as follows:
$ sudo apt-get install gnuplot-x11
These data plots can then be read into gnuplot to display a waveform. Create a file
named gnuplot.cmd with these commands in it:
set title "IR Remote Waveform"
set xlabel "Time (ms)"
set ylabel "Level"
set autoscale
set yrange [−.1:1.2]
plot "gnuplot.dat" using 1:2 with lines
Collect your output into a file named gnuplot.dat (or change the file gnuplot.cmd to
use a different file name). Then run gnuplot on the data:
$ gnuplot -p gnuplot.cmd
Figure 5-3 shows an example plot display. Note that you'll normally have to edit out
all but the most interesting lines of data. Otherwise, your plot will be a rather crowded
display of vertical lines.
 
Search WWH ::




Custom Search