Main Site Documentation

I2C over different sockets


Can anyone explain me why Compass Module, which uses I2C requires I socket, while Temp&Humidity Module, which also uses I2C, requires X, Y?
What are the advantages of using dedicated I2C lines over GPIO ports as I2C?
Why Temp&Humidity Module cannot use O and S sockets (their 3rd and 4th pins are GPIO)?


SHT1x is NOT an I2C device, no matter what the GHI documentation says :slight_smile: It’s more like an SPI device, using a two-wire serial protocol (data and clock). The driver I suspect uses bitbang IO (basically software SPI with reduced pin count, no CS line)


You are absolutely right - it is not I2C.
And I think I have figured out the answer to my second question: every S and O socket will be marked with X.


@ iamin -

  1. This is simply a software-driven version of the protocol
  2. A dedicated bus is much faster than software, however I and S sockets are limited compared to GPIO sockets. The general reason for running a module via software is just to free up sockets that could be used for more important things.
  3. Actually, it is due to the fact that the data and clock pins are exposed on pins 3 & 4 while the I and S sockets require the data and clock pins to consume pins 7-9 for SPI and 8 & 9 for I2C