The Source for Java Technology Collaboration

As the new Java.net infrastructure contains project-level wikis, this main wiki will be shut down in the near future. For wiki page export and general wiki questions please contact the site admin at communitymanager@java.net.

SHT15

Summary

The SHT15 is a digital temperature and humidity sensor, providing 14 and 12 bits of precision for temperature and humidity, respectively.

Interface

The SHT15 requires two IIOPins from the EDemoBoard , D0-D4 for DATA and SCK. Ground and +3 must also be provided.

Sample Code

EDemoBoard edemo = EDemoBoard.getInstance();
IIOPin[] pins = edemo.getIOPins();
//We're assuming D0 is connected to DATA and D1 to SCK.  Change as needed.
SHT15 sensor = new SHT15(pins[EDemoBoard.D0], pins[EDemoBoard.D1]);
try {
     System.out.println(sensor.getTemperature(SHT15.CELSIUS));
     System.out.println(sensor.getHumidity());
} catch (ConnectionNotFoundException ex) {
      ex.printStackTrace();
}

External Links

Sparkfun SHT15 Breakout
Datasheet

Topic SHT15 . { Edit | Ref-By | Printable | Diffs r1 | More }
 XML java.net RSS

  

Revision r1 - 2009-03-17 - 22:12:46 - gklein
Parents: SpotsSensorFramework > SpotsExternalDrivers