Can I2C and SPI be used together within the same sketch?

I am using a pro-micro board (Atmega32u4). I am having problems of joint implementation of micro-sd card (spi) with oled display (i2c), please I would like to know if i2c and spi can be used together within the same sketch, or if they are mutually exclusive? Thank you

I2C and SPI can be used in the same sketch.

They use different pins. :sunglasses:

SD card together with OLED display are likely using a considerable percentage of the dynamic memory (ram).

1 Like