I’ve got some troubleshooting with one of my sensor : a digital light sensor (http://wiki.seeed.cc/Grove-Digital_Light_Sensor/)
Indeed, I am using two I2c sensors, a temperature & humidity sensor (https://www.seeedstudio.com/Grove-TemperatureHumidity-Sensor-HighAccuracy-Mini-p-1921.html) and the digital light sensor.
When both are connected, I got this error :
Error accessing 0x29: Check your I2C address
When I am just using the digital light sensor, I got inchorent values like :
Lux: 0 [Vis+IR=7, IR=-1 @ Gain=16x, Timing=402.0ms]
So, I don’t know exactly where comes from those problems. I think there is a conflict of adresses when there are 2 sensors connected but I don’t understand why I got strange values for the digital sensor ( the other sensor is working correctly).
Meanwhile, when I am doing :
sudo i2cdetect -y 1 all the sensors are well detected.
@walkpto : Can you post a screenshot of the output that you get when you run
i2cdetect -y 1 .
Also, are you running your own raspbian image or Dexter Industries Raspbian for Robots image. Can you post a screenshot of the error that you get too and a link to the programs that you are trying to run.
Can you also follow this guide, generate a test log and post them along with the screenshots that @karan had asked.
Hello @karan @Shoban,
First, this is the screenshot of the output I got when I runned :
sudo i2cdetect -y 1
Then, I think I am using a Dexter Industries Raspbian for Robots image, this is the result of
Now, this is the screenshot of the error I got when I am running this command :
sudo python grove_i2c_digital_light_sensor.py
To finish, I’m adding the test log and the script of the digital light sensor :
log.txt (5.7 KB)
grove_i2c_digital_light_sensor.py (7.8 KB)
I’m still thinking there is a problem of address between the two i2c sensors. Or, maybe it’s just the sensor…
@walkpto: the i2c command shows that there are 2 sensors connected. Can you just connect the digital light sensor and run the program again and see if it gives any better values. Can you post a screenshot of the output too. I’ll try that sensor later today and let you know how it works for me.
Yes the two i2c sensors are well detected. I disconnected the temperature&humidity sensor, so the air quality one is just connected and this is the screenshot of the output :
As we can see, there is still a problem with the values. On the first line, maybe the values are coherent but on the other lines, it’s not coherent at all.
Moreover, I also tried another script, the one which is on this page :http://wiki.seeed.cc/Grove-Digital_Light_Sensor/
grove_i2c_digital_light_sensor1.py (10.4 KB)
And I got this result :
@walkpto I just tried out the sensor that I had and it is working pretty well with the code that we have on our repo. However it does fail when I tried out the example on Seeed wiki.
Can you upload a picture of your setup and a few pictures of your sensor. When and where did you buy the sensor from.
Hey walkpto, you probably are using raspbian for robots. The uname command doesn’t always give the exact Linux distro. Check your desktop, if you see stuff like troubleshoot, do_update, etc. You’re using raspbian for robots.
Hey @graykevinb, indeed I am using Raspbian for Robots and I just did an update in the directory
/Desktop/GrovePi/Firmware with launching the script
firmware_update.sh . But I got the same problems…
It looks like the sensor itself is a bad one and is not working properly. Do you have an arduino around to test it with that. Where did you buy it from, and can you ask them for a replacement.
I am having the same trouble with my digital light sensor as OP. What’s the solution?