Giter VIP home page Giter VIP logo

sensor-projects's Introduction

Summary

This is a set of Java libraries for communicating with various types of sensor interfaces that are typically used in schools.

Getting started

This project uses maven for building. Most developement is done in Eclipse with the m2e plugin, but you should be able to work on it with just maven at the commandline or any IDE with maven support.

The current place to get started is to look at the ExampleSensorApp class. You can subclass this and modify the deviceId and possibly openString in order to test out a specific device. The list of available 'deviceId's is in the DeviceID interface.

If you don't have any hardware you can start with the PseudoSensorExampleApp which extends ExampleSensorApp.

Architecture

There code in the sensor sub project provides two APIs

  1. one for application developers to use sensors without writing vendor or device specific code
  2. one to add support for a new device to the framework

The main interface for both APIs is the org.concord.sensor.device.SensorDevice There are javadocs in this interface describing how it is intended to be used.

A summary of one way to use the application API goes like this:

  1. The Application uses a DeviceFactory to get an instance of a SensorDevice
  2. The Application creates a ExperientRequest consisting of one or more SensorRequests. This describes what sensors and timing the Application wants to use.
  3. The Application calls SensorDevice#configure with this ExperimentRequest
  4. The SensorDevice implementation asks the hardware what sensors are actually attached, compares it to the requested sensors, and then returns a ExperiementConfig that contains the set of sensors which the SensorDevice feels is the best match for the request. This ExperiementConfig also indicates if the SensorDevice thinks the config meets the requirements of the request. So for example if the ExperimentRequest contains a temperature sensor but no temperature sensor is attached, the returned ExperimentConfig should indicate the requirements are not met.
  5. The Application then calls SensorDevice#start to start collecting data from the sensors specified in the most recently returned ExperimentConfig.
  6. The Application calls SensorDevice#read again and again to get the resulting data.
  7. The Application calls SensorDevice#stop when it doesn't want to read anymore data.

TODO

  • move ftdi-serial-wrapper into its own repository, it isn't used by any of this code and could be a useful independent project for someone
  • get jars deployed to maven central
  • update documentation to make it really easy to try out by pulling jars from central
  • remove sensor native
  • make sure the native libraries are not loaded multiple times in a single jvm
  • make a command line app that lists the available devices, and runs the 2 tests on whichever device the user selects
  • move the matching of current configuration of sensors to a different API layer. This simplifies the the implementation for the Vendors, and it also provides a simplier API for Application developers

sensor-projects's People

Contributors

scytacki avatar lonoami avatar stepheneb avatar dmarkman avatar psndcsrv avatar sfentress avatar

Watchers

James Cloos avatar Ling Zhang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.