Pārlūkot izejas kodu

fix lux sensor address and range

Thomas B 8 mēnešus atpakaļ
vecāks
revīzija
919634a4e9
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      sensor/src/lux.c

+ 2
- 2
sensor/src/lux.c Parādīt failu

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) {

Notiek ielāde…
Atcelt
Saglabāt