|
Post by edeneault on May 14, 2020 19:41:41 GMT -8
Greetings! I am having lot's of fun putting together this project. I am only semi-proficient with rasp pi's and python so forgive my ignorance:) The issue is as follows:
When I sudo python testAllSensors.py, I receive the following return:
pi@raspberrypi:~/SDL_Pi_SmartGardenSystem $ python testAllSensors.py
Traceback (most recent call last):
File "testAllSensors.py", line 39, in <module>
import SDL_Pi_SI1145
File "./SDL_Pi_SI1145/SDL_Pi_SI1145.py", line 156, in <module>
class SDL_Pi_SI1145(object):
File "./SDL_Pi_SI1145/SDL_Pi_SI1145.py", line 157, in SDL_Pi_SI1145
def __init__(self, address=SI1145_ADDR, busnum=I2C.get_default_bus()):
File "./SDL_Pi_SI1145/I2C.py", line 55, in get_default_bus
raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform.
When I sudo i2cdetect -y 1 , I seem to have a good return: 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: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: 40 -- -- -- -- -- -- -- 48 49 -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Any help/advice are much appreciated. Kindly.
|
|
|
Post by edeneault on May 14, 2020 20:02:05 GMT -8
Just seem to have solved the issue following instructions in previous post. Thank you. the fix:
sudo nano SDL_Pi_SI1145/I2C.py
change line 55 to:
return 1
Thank you.
|
|
|
Post by SDL on May 16, 2020 7:50:32 GMT -8
Hmm.
Did you have the SI1145 plugged in? Is it plugged into the I2C bus? It looks like it is (0x60)
What Raspberry Pi are you running? What version of the OS?
This error is strange:
raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform.
BP
|
|