Public: Sensor Library : Getting Started
This page last changed on Feb 20, 2008 by scytacki.
It is easiest to get started with the Vernier devices because their protocols and native librarires are freely distributable.
Check out these projects from subversion:
These all use https://svn.concord.org/svn/projects/trunk/common/java as their root:
Each project (except for thirdparty-jars) has documentation located here:
If you look under the "Project Reports" link to left, you can find the javadocs.
We typically use eclipse to work with this code. So each project has eclipse .project and .classpath files in it which configure the project in eclipse. If you check out all the projects above into a eclipse workspace you should all the projects should be built automatically.
If you use netbeans, you should be able to check all the projects out, and connect then add dependencies on each other. You can know the dependency for each project by looking in the pom.xml which inside of the project. You can also look at the built documentation described above to find the dependencies for each project.
There are also a combination of maven2 and netbeans plugins which might make this process automatic. We have not experimented with this at all, so it might not be a good approach more info can be found here: http://mevenide.codehaus.org
Because we do not use NetBeans, if you find things we could change to make it easier to use our projects in NetBeans please let us know.
We use maven2 to build the projects outside of eclipse. For example the projects above are built here: http://continuum.concord.org/continuum/servlet/continuum
If you want to use maven2 to build the project you should install the latest version of maven http://maven.apache.org
In each project in the following order:
In sensor-native/src/java there is a class:
That will setup up the Sensor Device System to work with the Vernier GoLink interface. And setup a request to work with a temperature sensor. And then it starts the sensors and prints out a few values, and stops the sensor.
In all the projects are loaded into eclipse, you can go to the menu "Run" -> "Open Run Dialog...". Under the Java Application item on the left there will be a TestGoLinkTemerature item. This can be run by clicking on Run button.
In the sensor-native folder run:
After downloading several plugins, it print out a classpath that includes most of the jars needed to run the test class. Calling this classpath "$mvn_classpath".
The classes from all the projects need to be added to the classpath. And the RXTXcomm-2.1.7.jar
|Document generated by Confluence on Jan 27, 2014 16:55|