I'm doing a similar project as the link below that uses the Seeeduino XIAO, LCD display and the maxim blood oxygen sensor. I'm a little confused with the circuit connection this guy made.

Link to his project: https://www.instructables.com/Blood-Oxygen-Heart-Rate-Meter/#discuss

Pin 4 and 5 are the actual and the only SDA and SCL on the XIAO, which are already used by the maxim sensor according to his connection summary. But I can't understand how he used pin 8 and 10 for the SCL and SDA of the LCD display? I can't find anything in his code that assigns pin 8 or 10 as an additional SCL/SDA for the XIAO.

Source code can be found at: https://github.com/moononournation/BloodOxygenHeartRateMeter

enter image description here

I've read somewhere that two I2C devices (display and sensor) can be connected to the same SDA and SCL pin in parallel with a pull up resistor, but this seems to work differently.

I'm not sure what I missed but I would love to understand how he made pin 8 and 10 as additional SCL and SDA. Any help would be appreciated, Thank you :)


1 Answer 1


The SAMD family of microprocessor internally use a SERCOM hardware block that may be configured as SPI, I2C, or UART. The Arduino library supporting the SAMD may be modified to implement UART or I2C on what the library configures by default as a SPI port.

But the simpler answer is that the Instructible is wrong.

The code creates a one directional SPI interface. Only CLK and MOSI signals.

using the GFX library

Arduino_DataBus bus = new Arduino_HWSPI(3 / DC /, -1 / CS */); Arduino_ST7789 *gfx = new Arduino_ST7789(bus, 2 ...

To drive a ST7789 SPI display using the default SPI interface on the XIAO.

  • \$\begingroup\$ "the simpler answer is that the Instructible is wrong". SAMD21G18-MU (which is used in Xiao) is a 48-pin package, the Sercom port that support the I2C for 48-pin package are PA08, PA09, PA12, PA13, PA16, PA17, PA22, PA23. SAMD21 as a family can support up to 6 hardware I2C interfaces. Do the fact checking by reading the datasheet (section 7.2.3 SERCOM I2C Pins). \$\endgroup\$
    – hcheung
    Oct 28, 2023 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.