
Importing DAQFlex for Android into Eclipse
2
Importing DAQFlex for Android into Eclipse
Complete the following steps to run in Eclipse on your computer, create a new Android project, and import the
DAQFlex project into Eclipse:
1. On your computer, run Eclipse and select
Window»Perspective»Java.
2. Right-click in the
Package Explorer pane and select Import.
3. Expand the
General folder, select Existing Projects into Workspace and click Next.
4. Choose the
Select archive file option, browse for the DAQFlex for Android API zip file
(
daqflex_android.zip), and click Finish.
The DAQFlex project is required for all applications that use the DAQFlex API. All of the other projects
are usage examples.
Each of the DAQFlex for Android projects is listed in the
Package Explorer pane (refer to Figure 1). The
function of each project is explained below.
Figure 1. Package Explorer listing DAQFlex for Android example projects
AinExample Enter a channel number and press the Update Value button to
display the value acquired from the channel.
AInScanContinuousServiceExample Enter a channel range (Low Channel and High Channel) and a
sample rate, and press the Run Scan button. Application
continuously displays acquired values from each channel. Scan runs
until the user presses the Stop Scan button.
AinScanFiniteEx Enter a channel range (Low Channel and High Channel), a
sample rate, the number of samples to acquire, and press the Run
Scan button. Application displays the samples acquired from each
channel. Scan stops when the specified number of samples are
displayed for each channel (or until the user presses the Stop Scan
button).
AoutExample Enter a channel number and a value and press the Update Value
button. Specified analog channel is updated with the value.
CtrExample Enter a channel number and press the Start button to start counting.
User can press the Update Value or Stop button to display the
current value. Users can also enter a number in the Load Value
textbox and press the Load button to set the starting counter
number.
Core project that is required for all usage examples.
DinExample Enter a channel number and press the Update Value button to
display the value acquired from the digital channel.
DoutExample Enter a channel number and a value and press the Update Value
button. Specified digital channel is updated with the value.
ExampleShared Project used by each example project that contains the UI control for
the device selector drop-down and a permissions button.
Komentáře k této Příručce