I2C device not detected only when SPI device is connected

I'm using an ESP8266 from Waveshare (universal e-paper driver), with a Sparkfun battery babysitter. I'm finding that when an e-paper screen is connected to the ESP8266 via SPI connections (ribbon cable) - then the battery babysitter is not detectable over I2C, the moment the e-paper screen is disconnected then the I2C device is detectable again. I'm finding this result by running the I2C scanner code, found here: Arduino Playground - I2cScanner

It's not clear to me how connecting one device can prevent another device from being read when they're using different protocols and different connections. Any help would be greatly appreciated.

What all pins are used by the SPI display? What pins are used by I2C?

The SPI display is using pins:
CS: 15
RST: 5
DC: 4
BUSY: 16

The I2C device is using:
SDA: 4
SCL: 5

So there is crossover on 5 and 4 but given that I2C is a bus should they not be able to share?

SPI and I2C are totally different bus systems.
They require separate pin assignments.

Tom.... :smiley: :+1: :coffee: :australia:

Thanks @TomGeorge, can I just move my I2C device along to two unused pins?

I am not familiar with the ESP8266.
You might be worth googling .

esp8266 SPI I2C

Tom... :smiley: :+1: :coffee: :australia:

1 Like


With the ESP8266 you can pick your I2C pins. You specify the pins that you want to use in the begin function.
Wire.begin(SDA_PIN, SCL_PIN);

1 Like

Excellent, thanks @groundFungus