1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 |
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2561_U.h>
Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345);
void setup(void) {
Serial.begin(9600);
}
void loop(void) {
sensors_event_t event;
tsl.getEvent(&event);
if (event.light) {
Serial.print(event.light); Serial.println(" lux");
}
delay(250);
} |
cs |
카테고리 없음