Post by s0urkraut86 on Mar 3, 2019 13:17:41 GMT -8
I think i have everything hooked up correctly, the TCA script is showing Bus 2 40 which indicates it can see the board but when running the script i get this error. I have a grove connector from J7 Grove I2C on suncontrol board hooked up to J4 on the 4 chan mux
[email protected]:~/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221 $ python testSDL_Pi_INA3221.py
Test SDL_Pi_INA3221 Version 1.0 - SwitchDoc Labs
Sample uses 0x40 and SunAirPlus board INA3221
Will work with the INA3221 SwitchDoc Labs Breakout Board
Program Started at:2019-03-03 16:06:33
Traceback (most recent call last):
File "testSDL_Pi_INA3221.py", line 30, in <module>
ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40)
File "/home/pi/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__
self._write_register_little_endian(INA3221_REG_CONFIG, config)
File "/home/pi/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian
self._bus.write_word_data(self._addr, register, switchdata)
IOError: [Errno 121] Remote I/O error
[email protected]:~/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221 $ python --version
Python 2.7.13
Test SDL_Pi_TCA9545 Version 1.0 - SwitchDoc Labs
Sample uses 0x73
Program Started at:2019-03-03 16:02:11
-----------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: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
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: 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
[email protected]:~/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221 $ python testSDL_Pi_INA3221.py
Test SDL_Pi_INA3221 Version 1.0 - SwitchDoc Labs
Sample uses 0x40 and SunAirPlus board INA3221
Will work with the INA3221 SwitchDoc Labs Breakout Board
Program Started at:2019-03-03 16:06:33
Traceback (most recent call last):
File "testSDL_Pi_INA3221.py", line 30, in <module>
ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40)
File "/home/pi/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__
self._write_register_little_endian(INA3221_REG_CONFIG, config)
File "/home/pi/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian
self._bus.write_word_data(self._addr, register, switchdata)
IOError: [Errno 121] Remote I/O error
[email protected]:~/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221 $ python --version
Python 2.7.13
Test SDL_Pi_TCA9545 Version 1.0 - SwitchDoc Labs
Sample uses 0x73
Program Started at:2019-03-03 16:02:11
-----------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: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
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: 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------