Loading...
Searching...
No Matches

Interface definition for the BH1900NUX temperature sensor. More...

Detailed Description

Interface definition for the BH1900NUX temperature sensor.

Author
Wouter Symons wsymo.nosp@m.ns@n.nosp@m.alys-.nosp@m.grou.nosp@m.p.com

Definition in file bh1900nux.h.

#include "periph/i2c.h"
+ Include dependency graph for bh1900nux.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bh1900nux_t
 Device descriptor for BH1900NUX devices. More...
 
struct  bh1900nux_params_t
 Set of configuration parameters for BH1900NUX devices. More...
 

Macros

#define BH1900NUX_DEFAULT_ADDR   BH1900NUX_ADDR_1
 Default address of BH1900NUX sensors.
 
#define BH1900NUX_I2C_MAX_CLK   I2C_SPEED_FAST
 Maximum I2C bus speed to use with the device.
 

Enumerations

enum  { BH1900NUX_OK = 0 , BH1900NUX_ERR_I2C = -1 }
 Status and error return codes. More...
 

Functions

int bh1900nux_init (bh1900nux_t *dev, const bh1900nux_params_t *params)
 Initialize the given BH1900NUX device.
 
int bh1900nux_read (const bh1900nux_t *dev, int16_t *temp)
 Read the temperature measerd by the device [MILICELSIUS].
 

Possible I2C bus addresses of the device

The actual address of the device depends on the states of the slave address pins.

#define BH1900NUX_ADDR_1   (0x48)
 A2:L A1:L A0:L.
 
#define BH1900NUX_ADDR_2   (0x49)
 A2:L A1:L A0:H.
 
#define BH1900NUX_ADDR_3   (0x4a)
 A2:L A1:H A0:L.
 
#define BH1900NUX_ADDR_4   (0x4b)
 A2:L A1:H A0:H.
 
#define BH1900NUX_ADDR_5   (0x4c)
 A2:H A1:L A0:L.
 
#define BH1900NUX_ADDR_6   (0x4d)
 A2:H A1:L A0:H.
 
#define BH1900NUX_ADDR_7   (0x4e)
 A2:H A1:H A0:L.
 
#define BH1900NUX_ADDR_8   (0x4f)
 A2:H A1:H A0:H.
 

Temperature register address

Address of the temperature resister

#define BH1900NUX_REG_ADDR   (0x00)