Loading...
Searching...
No Matches
bh1750fvi_internal.h File Reference

Command definition for the BH1750FVI light sensor. More...

Detailed Description

Command definition for the BH1750FVI light sensor.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file bh1750fvi_internal.h.

Go to the source code of this file.

#define RES_DIV   (78642)
 Result divisor (1.2 times 65535)
 

Opcodes

#define OP_POWER_DOWN   (0x00)
 
#define OP_POWER_ON   (0x01)
 
#define OP_RESET   (0x03)
 
#define OP_CONT_HRES1   (0x10)
 
#define OP_CONT_HRES2   (0x11)
 
#define OP_CONT_LRES   (0x13)
 
#define OP_SINGLE_HRES1   (0x20)
 
#define OP_SINGLE_HRES2   (0x21)
 
#define OP_SINGLE_LRES   (0x23)
 
#define OP_CHANGE_TIME_H_MASK   (0x40)
 
#define OP_CHANGE_TIME_L_MASK   (0x60)
 

Measurement delays (in us)

#define DELAY_HMODE   (120000)
 typ.
 
#define DELAY_LMODE   (16000)
 typ.
 

Macro Definition Documentation

◆ DELAY_HMODE

#define DELAY_HMODE   (120000)

typ.

120ms in H-mode

Definition at line 56 of file bh1750fvi_internal.h.

◆ DELAY_LMODE

#define DELAY_LMODE   (16000)

typ.

16ms in L-mode

Definition at line 57 of file bh1750fvi_internal.h.

◆ OP_CHANGE_TIME_H_MASK

#define OP_CHANGE_TIME_H_MASK   (0x40)

Definition at line 48 of file bh1750fvi_internal.h.

◆ OP_CHANGE_TIME_L_MASK

#define OP_CHANGE_TIME_L_MASK   (0x60)

Definition at line 49 of file bh1750fvi_internal.h.

◆ OP_CONT_HRES1

#define OP_CONT_HRES1   (0x10)

Definition at line 42 of file bh1750fvi_internal.h.

◆ OP_CONT_HRES2

#define OP_CONT_HRES2   (0x11)

Definition at line 43 of file bh1750fvi_internal.h.

◆ OP_CONT_LRES

#define OP_CONT_LRES   (0x13)

Definition at line 44 of file bh1750fvi_internal.h.

◆ OP_POWER_DOWN

#define OP_POWER_DOWN   (0x00)

Definition at line 39 of file bh1750fvi_internal.h.

◆ OP_POWER_ON

#define OP_POWER_ON   (0x01)

Definition at line 40 of file bh1750fvi_internal.h.

◆ OP_RESET

#define OP_RESET   (0x03)

Definition at line 41 of file bh1750fvi_internal.h.

◆ OP_SINGLE_HRES1

#define OP_SINGLE_HRES1   (0x20)

Definition at line 45 of file bh1750fvi_internal.h.

◆ OP_SINGLE_HRES2

#define OP_SINGLE_HRES2   (0x21)

Definition at line 46 of file bh1750fvi_internal.h.

◆ OP_SINGLE_LRES

#define OP_SINGLE_LRES   (0x23)

Definition at line 47 of file bh1750fvi_internal.h.

◆ RES_DIV

#define RES_DIV   (78642)

Result divisor (1.2 times 65535)

The 16-bit RAW results have to be divided by 1.2. We do this by using fixed floating point arithmetic by multiplying divisor and RAW value by 65535 ( uint16_t max).

Definition at line 33 of file bh1750fvi_internal.h.