浏览代码

https://github.com/adafruit/Adafruit_TSL2591_Library/issues/11

ladyada 8 年之前
父节点
当前提交
999f8cf5c9
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      examples/tsl2591_interrupt/tsl2591_interrupt.ino

+ 7 - 7
examples/tsl2591_interrupt/tsl2591_interrupt.ino

@@ -42,8 +42,8 @@
 
 // Example for demonstrating the TSL2591 library - public domain!
 
-// connect SCL to analog 5
-// connect SDA to analog 4
+// connect SCL to I2C Clock
+// connect SDA to I2C Data
 // connect Vin to 3.3-5V DC
 // connect GROUND to common ground
 
@@ -71,7 +71,7 @@ void displaySensorDetails(void)
   Serial.print  ("Unique ID:    "); Serial.println(sensor.sensor_id);
   Serial.print  ("Max Value:    "); Serial.print(sensor.max_value); Serial.println(" lux");
   Serial.print  ("Min Value:    "); Serial.print(sensor.min_value); Serial.println(" lux");
-  Serial.print  ("Resolution:   "); Serial.print(sensor.resolution); Serial.println(" lux");
+  Serial.print  ("Resolution:   "); Serial.print(sensor.resolution, 4); Serial.println(" lux");
   Serial.println("------------------------------------");
   Serial.println("");
   delay(500);
@@ -131,10 +131,10 @@ void configureSensor(void)
                         TLS2591_INT_PERSIST);
 
   /* Display the interrupt threshold window */
-  Serial.print("Interrupt Threshold Window: -");
+  Serial.print("Interrupt Threshold Window: ");
   Serial.print(TLS2591_INT_THRESHOLD_LOWER, DEC);
-  Serial.print(" to +");
-  Serial.println(TLS2591_INT_THRESHOLD_LOWER, DEC);  
+  Serial.print(" to ");
+  Serial.println(TLS2591_INT_THRESHOLD_UPPER, DEC);  
   Serial.println("");
 }
 
@@ -226,4 +226,4 @@ void loop(void)
   advancedRead();
   getStatus();
   delay(500);
-}
+}