Device-Chip-MPL3115A2

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


 read_min_altitude

 read_max_altitude

       $altitude = await $chip->read_min_altitude;
    
       $altitude = await $chip->read_max_altitude;

    Returns the values of the P_MIN and P_MAX registers, suitably converted
    into metres.

 clear_min_altitude

 clear_max_altitude

       await $chip->clear_min_altitude;
    
       await $chip->clear_max_altitude;

    Clear the P_MIN or P_MAX registers, resetting them to start again from
    the next measurement.

 read_min_temperature

 read_max_temperature

       $temperature = await $chip->read_min_temperature;
    
       $temperature = await $chip->read_max_temperature;

    Returns the values of the T_MIN and T_MAX registers, suitably converted
    into metres.

 clear_min_temperature

 clear_max_temperature

       await $chip->clear_min_temperature;
    
       await $chip->clear_max_temperature;

    Clear the T_MIN or T_MAX registers, resetting them to start again from
    the next measurement.

METHODS

 check_id

       await $chip->check_id;

    Reads the WHO_AM_I register and checks for a valid ID result. The
    returned future fails if the expected result is not received.

 start_oneshot

       await $chip->start_oneshot;

    Sets the OST bit of CTRL_REG1 to start a one-shot measurement when in
    standby mode. After calling this method you will need to use
    busywait_oneshot to wait for the measurement to finish, or rely somehow
    on the interrupts.

 busywait_oneshot

       await $chip->busywait_oneshot;

    Repeatedly reads the OST bit of CTRL_REG1 until it becomes clear.

 oneshot

       await $chip->oneshot;

    A convenient wrapper around start_oneshot and busywait_oneshot.

AUTHOR

    Paul Evans <leonerd@leonerd.org.uk>



( run in 1.485 second using v1.01-cache-2.11-cpan-5837b0d9d2c )