Download Linux Journal | August 2010 | Issue 196

Transcript
Installing and Testing kst
kst can read text-based data from a file and has basic data analysis
capabilities. As part of the KDE suite of applications, it is available
on virtually all modern Linux distributions.
The easiest way to put kst on your machine is with your
distribution’s package manager. I used Synaptic under Xubuntu for
the installation on my ASUS 64-bit Core Duo X83-VM notebook.
Once installed, kst appears under the Applications and
Accessories pull-down tabs on the desktop taskbar.
Below is a small segment of some temperature and light-level
data that I captured. The data snapshot will be used to test kst.
Later, this same format will be used to stream real-time data from
the Arduino into our Linux machine. Copy the data into a text file
named testdata.txt:
74.64|444
74.64|448
74.64|452
74.64|450
74.64|447
74.64|439
74.64|435
Then start kst. The main kst window will show the task bar
across the top and the kst QuickStart window in the middle.
Click on the Data Wizard button at the bottom of the Kst
QuickStart pop-up pane. Figure 1 shows the kst toolbar, data
source and configure data source windows. The pop-up Data
Source pane will appear. Enter the data filename, testdata.txt.
Press the Configure button. The Configure Data Source pane
appears. Enter the custom delimiter character to separate the
values in the data set. I used the vertical bar as a delimiter
between the temperature and light-level values.
Figure 1. kst Toolbar, Data Source and Configure Data Source Window
Once the delimiter character is set, click the Apply then the OK
buttons to save the settings and close the window. Click Next on
the Data Source pane to bring up the Select Data pop-up window.
In the Data Source pane, hold down the Ctrl key and select
numbers 1 and 2 in the left-hand pane. These correspond to the
temperature (left) and light-level (right) values in the data file.
Once selected, click the right-pointing arrow to copy the data
streams to the right-hand pane. Using two data streams will give
two separate graphs, one for temperature and one for light levels,
referenced by a common line number. Temperature and light levels