Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C error (Please check if the I2C device insert in I2C of Base Hat) #2

Open
duart38 opened this issue Sep 22, 2022 · 4 comments
Open

Comments

@duart38
Copy link

duart38 commented Sep 22, 2022

Describe the bug
I get an error when trying to run the example program which I can't seem to figure out why:

I2C error (Please check if the I2C device insert in I2C of Base Hat)

To Reproduce
Steps to reproduce the behavior:

  1. Plug in sensor and run the test program (within this repo) https://wiki.seeedstudio.com/Grove-Sunlight_Sensor/

Desktop (please complete the following information):

  • Device: Raspberry pi 4
  • OS: Raspbian 11 (bullseye)

Additional context
I2C detection shows that the OS sees the sensor, see output:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         08 -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- 53 -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --   

I have also tried to manually enter the address with no luck:

# .....
SI1145 = seeed_si114x.grove_si114x(0x53)
# .....

I'm using the grove hat and have since also opened an issue there in the case that the issue lies on their part but the error seems to be from this library since I've attempted to print out the result of reading "self._ReadByte(SI114X_PART_ID)" and it seems to return a value (81).

@htkelly
Copy link

htkelly commented Jan 10, 2023

I'm experiencing the same issue with the same equipment (SI114X and Grove base hat) and this library.

Also getting the same output from I2C detection:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- 08 -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- 53 -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  

@duart38 did you learn anything more about this? It seems the actual I2C address of the sensor is 0x53 but the library expects 0x60. However as you noted, passing 0x53 when initializing does not help.

@A-Cedeno
Copy link

@duart38 @htkelly were you able to fix this issue? I also get the same error "Please check if the I2C device insert in I2C of Base Hat" when I follow the tutorial.

@htkelly
Copy link

htkelly commented Feb 22, 2023

@A-Cedeno actually I did. For me, it was because I was using the wrong library for my version of the sensor. I have the v 2.0 sensor which is based on Si1151. Using the Si1145 library gives this error.

The file you need is in the Si115X branch of this repo. Let me know if it works:
https://github.com/Seeed-Studio/Seeed_Python_SI114X/blob/Si115x/seeed_si115x.py

@A-Cedeno
Copy link

A-Cedeno commented Feb 23, 2023

@htkelly Yes, the Si115X library worked! Thank you for the advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants