Post by karambit on Jan 28, 2018 9:19:17 GMT -8
My SI1145 Sunlight Sensor is not working. I can't read it with the GroveWeatherPi.py script or the simpletest.py. It is wired up correctly to the Grove connector under the JP4 on the Mux. I see it on Bus 3 after running TCA9545 test script. I do not see it at 0x60 when running i2cdetect.
pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- 77
pi@raspberrypi:~ $ cd SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545/
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ sudo python testSDL_Pi_TCA9545.py
Test SDL_Pi_TCA9545 Version 1.0 - SwitchDoc Labs
Sample uses 0x73
Program Started at:2018-01-28 12:14:03
-----------BUS 0-------------------
tca9545 control register B3-B0 = 0x1
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- 77
-----------------------------------
-----------BUS 1-------------------
tca9545 control register B3-B0 = 0x2
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
-----------BUS 2-------------------
tca9545 control register B3-B0 = 0x4
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
-----------BUS 3-------------------
tca9545 control register B3-B0 = 0x8
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
^CTraceback (most recent call last):
File "testSDL_Pi_TCA9545.py", line 122, in <module>
time.sleep(5.0)
KeyboardInterrupt
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ cd ..
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ cd SDL_Pi_SI1145/
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145 $ sudo python simpletest.py
Traceback (most recent call last):
File "simpletest.py", line 41, in <module>
sensor = SDL_Pi_SI1145.SDL_Pi_SI1145()
File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145/SDL_Pi_SI1145.py", line 165, in __init__
self._reset()
File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145/SDL_Pi_SI1145.py", line 172, in _reset
self._device.write_byte_data(SI1145_ADDR,SI1145_REG_MEASRATE0, 0)
IOError: [Errno 121] Remote I/O error