tek:lumiere
Différences
Ci-dessous, les différences entre deux révisions de la page.
— | tek:lumiere [2024/02/09 17:26] (Version actuelle) – créée - modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | #define I2C_ADDR (0x29) 0x39 ? | ||
+ | |||
+ | #define REG_CONTROL 0x00 | ||
+ | #define REG_CONFIG 0x01 | ||
+ | #define REG_DATALOW 0x04 | ||
+ | #define REG_DATAHIGH 0x05 | ||
+ | #define REG_ID 0x0A | ||
+ | |||
+ | ecrire 0x80 | ||
+ | ecrire 0x03 | ||
+ | |||
+ | lire 2 registres | ||
+ | |||
+ | The ADC output is a 16-bit number that is directly proportional to the value that approximates the human eye | ||
+ | response in the commonly used illuminance unit of lux. The light level can be calculated using the following | ||
+ | expression. | ||
+ | < | ||
+ | Light Level (lux) = MULTIPLIER × [ (DATAHIGH << 8) + DATALOW ] | ||
+ | Where: | ||
+ | | ||
+ | | ||
+ | << 8 indicates a logical 8-bit shift left operation, and | ||
+ | | ||
+ | Example: | ||
+ | | ||
+ | | ||
+ | | ||
+ | 1 × [ (DATAHIGH << 8) + DATALOW] lux | ||
+ | | ||
+ | = (0x63 << 8) + 0x9C lux | ||
+ | = 0x639C lux | ||
+ | = 25,500 lux | ||
+ | </ | ||
+ | |||
+ | http:// | ||