<ARIA>
is loaded. Procedures for common methods other than begin()
are executed within the board behavior.Processing Flow
Wire.begin()
: Initialize the bus.begin()
: Start sensor operation- Wait a few milliseconds
.available()
becomestrue
.get_temp(), .get_humid()
: Read the values
Required Procedures for Operation
Wire Bus
Ensure the Wire is active using Wire.begin()
before calling the begin()
method.
Procedure After Wake-up from Sleep
Ensure the Wire bus is active just before entering sleep (it will be automatically recovered after waking up).
Methods
get_temp()
, get_temp_cent()
double get_temp()
int16_t get_temp_cent()
Reads the temperature. get_temp()
returns the value in °C, and get_temp_cent()
returns the temperature multiplied by 100 as an integer.
On error, a value between -32760 and -32768 is returned.
get_humid()
, get_humid_per_dmil()
double get_humid()
int16_t get_humid_per_dmil()
Reads the humidity. get_humid()
returns the value in %, and get_humid_per_dmil()
returns the humidity multiplied by 100 as an integer.
On error, a value between -32760 and -32768 is returned.
Common Methods
setup()
void setup()
Allocates memory and performs initialization for the sensor.
begin()
, end()
void begin()
void end()
Starts sensor data acquisition. It requires approximately 5ms of wait time before values can be read.
end()
is not supported.
process_ev()
void process_ev(uint32_t arg1, uint32_t arg2 = 0)
For sensors requiring wait-time processing, pass E_EVENT_TICK_TIMER
or E_EVENT_START_UP
to arg1
to notify time progression. After calling this method and enough time has passed, the sensor becomes available and its value can be read.
available()
bool available()
Returns true
when the sensor meets the read condition.
probe()
bool probe()
Returns true
when the sensor is connected.