LTR-308ALS - Luminance Sensor
LTR-308ALS - Illuminance sensor
最終更新
LTR-308ALS - Illuminance sensor
Illuminance sensor using I2C bus.
Available only when the board BEHAVIOR <PAL_AMB> is loaded. Procedures of common methods except begin() are executed in board BEHAVIOR.
Wire.begin(): initialize bus 2..begin(): Start sensor operation 3.
wait 50ms
.available() becomes `true
.get_luminance(): read value
Before calling .begin() method, Wire should be put into operation by Wire.begin().
Keep the Wire bus in operation just before sleep (the Wire is automatically restored after returning from sleep).
Returns an integer value of the illuminance [lx].
Returns -1 on error.
Allocates and initializes a memory area for the sensor.
Starts acquiring a sensor. Wait about 50ms before reading the sensor value.
Does not support end().
In the case of a sensor with a waiting process, give arg1 E_EVENT_TICK_TIMER or E_EVENT_START_UP to signal the passage of time. If the required time has elapsed after calling this method, it becomes available and the sensor value can be read.
Returns true when the sensor satisfies the read condition.
Return true when the sensor is connected.
最終更新
uint32_t get_luminance()void setup() void begin()
void end()void process_ev(uint32_t arg1, uint32_t arg2 = 0)bool available()bool probe()