Hi
I could very well be doing something stupid, but as sometimes you can't see the woods for the trees I'm hoping someone else can.
I'm attempting to get an I2C sensor running with a Pico. Wouldn't do much so I used the I2C sniffer which returned the following (excert, it runs up to 254 then repeats). I modified the sniffer to use the Pico with appropriate pins
Seems strange to say the least. I get the same results with nothing connected to the pins.
Swapping the sensor for a Display on the same pins, I can get the display to work, but if I use the sniffer I get the same as above.
Regards
EDIT
I did manage to get the sensor to work, but not having much luck with the sniffer on the Pico or on an ESP32-Lolin
I2C & Sniffer
-
- Valued Contributor
- Posts: 1528
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: I2C & Sniffer
Hi
It was one of the BH1750 modules.
I used one last year, but this was a different version and I was intending using it with either a Pico or an ESP32-Lolin. Usually if I have any trouble with any I2C, the sniffer is helpful. My sensor issue was related to the JST connector. Removing it and connecting directly resolved, nothing to do with the chip or FC, but I had the strange sniffer results even with nothing connected.
Regards
It was one of the BH1750 modules.
I used one last year, but this was a different version and I was intending using it with either a Pico or an ESP32-Lolin. Usually if I have any trouble with any I2C, the sniffer is helpful. My sensor issue was related to the JST connector. Removing it and connecting directly resolved, nothing to do with the chip or FC, but I had the strange sniffer results even with nothing connected.
Regards
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: I2C & Sniffer
Hi
I can do so later today, but if you look through this forum (prob about page 13) you will see reference to using one of these sensors.
In the thread Medelec35 linked to a sensor he used, and it was one of them I'm now using.
Sensor isn't the problem, it works and so does display etc, but sniffer is giving strange results.
Regards
I can do so later today, but if you look through this forum (prob about page 13) you will see reference to using one of these sensors.
In the thread Medelec35 linked to a sensor he used, and it was one of them I'm now using.
Sensor isn't the problem, it works and so does display etc, but sniffer is giving strange results.
Regards
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: I2C & Sniffer
Hi.
I have attached a new version that should work on PICO.
There are caveats.
1. You must have at least 1 I2C component connected or you will see every address appear.
If that is the case you will know there is a faulty component or connection.
2. Will only work in software mode.
I have spotted an issue with the I2C cal file so you will need the attached file for the Scanner/Sniffer to compile.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
save the attached CAL file in the above location.
Hopefully, it will work for you
I have attached a new version that should work on PICO.
There are caveats.
1. You must have at least 1 I2C component connected or you will see every address appear.
If that is the case you will know there is a faulty component or connection.
2. Will only work in software mode.
I have spotted an issue with the I2C cal file so you will need the attached file for the Scanner/Sniffer to compile.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Code: Select all
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\PICO\
Hopefully, it will work for you
- Attachments
-
- PICO_CAL_I2C.c
- (15.04 KiB) Downloaded 441 times
-
- IC2_Address_Scanner v4.fcfx
- (19.98 KiB) Downloaded 467 times
Martin
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: I2C & Sniffer
Hi
Sorry for the tardy reply, I was called away for a few days.
Just downloaded and tested.
Pico with I2C Display connected:-
Pico with display Data line disconnected:-
Looks like it's now working fine as you describe
Thanks.
Sorry for the tardy reply, I was called away for a few days.
Just downloaded and tested.
Pico with I2C Display connected:-
Pico with display Data line disconnected:-
Looks like it's now working fine as you describe

Thanks.
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: I2C & Sniffer
Hi Viktor
This is the link for the sensors
https://www.amazon.co.uk/dp/B07YDH737W? ... ct_details
Within the description there is a link to what I presume was the datasheet, but this is broken. However a search for the module will give you good results.
As per a previous post last year, the modules are quite accurate when compared to both a "cheap" meter and a calibrated one. The difference for my need was trivial and consistant through range.
Regards
This is the link for the sensors
https://www.amazon.co.uk/dp/B07YDH737W? ... ct_details
Within the description there is a link to what I presume was the datasheet, but this is broken. However a search for the module will give you good results.
As per a previous post last year, the modules are quite accurate when compared to both a "cheap" meter and a calibrated one. The difference for my need was trivial and consistant through range.
Regards