LeanSol345
Junior Member level 2
Hello,
I'm designing a data logger using Raspberry Pico W to store I2C supported SHT30 (Temp/Humidity) sensor data in SD card.
I've a condition that SHT30 can be used at any I2C port (either 0 or 1).
As in code given below, when I'm storing data in SD card from I2C1 port it stores data correctly.
But when I call function from file written for I2C0, it shows me error although I change the pins of SHT30 sensor from I2C1 to I2C0.
There might be a chance that only one I2C port can be used for single sensor (or like that.) but I could not find something like that on internet.
How this can be resolved?
There are no errors in logic and files written for different ports of sensor as they give true output individually.
I'm designing a data logger using Raspberry Pico W to store I2C supported SHT30 (Temp/Humidity) sensor data in SD card.
I've a condition that SHT30 can be used at any I2C port (either 0 or 1).
As in code given below, when I'm storing data in SD card from I2C1 port it stores data correctly.
But when I call function from file written for I2C0, it shows me error although I change the pins of SHT30 sensor from I2C1 to I2C0.
There might be a chance that only one I2C port can be used for single sensor (or like that.) but I could not find something like that on internet.
How this can be resolved?
There are no errors in logic and files written for different ports of sensor as they give true output individually.