Browse Source

fix lux sensor address and range

Thomas B 3 months ago
parent
commit
919634a4e9
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      sensor/src/lux.c

+ 2
- 2
sensor/src/lux.c View File

21
 #include "twi.h"
21
 #include "twi.h"
22
 #include "lux.h"
22
 #include "lux.h"
23
 
23
 
24
-#define LUX_ADDR 0x5C
24
+#define LUX_ADDR 0x23 //0x5C
25
 
25
 
26
 #define OP_POWER_ON 0x01
26
 #define OP_POWER_ON 0x01
27
 #define OP_RESET 0x07
27
 #define OP_RESET 0x07
36
 
36
 
37
 void luxInit(void) {
37
 void luxInit(void) {
38
     twiWrite(LUX_ADDR, OP_POWER_ON);
38
     twiWrite(LUX_ADDR, OP_POWER_ON);
39
-    twiWrite(LUX_ADDR, OP_CONT_1X);
39
+    twiWrite(LUX_ADDR, OP_CONT_0_5X);
40
 }
40
 }
41
 
41
 
42
 uint16_t luxGet(void) {
42
 uint16_t luxGet(void) {

Loading…
Cancel
Save