Skip to content

Commit

Permalink
oi, fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Jun 4, 2014
1 parent b53588e commit 0d16717
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/HTU21DFtest/HTU21DFtest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
interface
****************************************************/

include <Wire.h>
#include <Wire.h>
#include "Adafruit_HTU21DF.h"

// Connect Vin to 3-5VDC
Expand All @@ -22,12 +22,15 @@ void setup() {
Serial.begin(9600);
Serial.println("HTU21D-F test");

htu.begin();
if (!htu.begin()) {
Serial.println("Couldn't find sensor!");
while (1);
}
}


void loop() {
Serial.print("Temp: "); Serial.println(htu.readTemperature());
Serial.print("Hum: "); Serial.println(htu.readHumidity());
Serial.print("Temp: "); Serial.print(htu.readTemperature());
Serial.print("\t\tHum: "); Serial.println(htu.readHumidity());
delay(500);
}

0 comments on commit 0d16717

Please sign in to comment.