Skip to content

SDA and SCL are flipped #3570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2020
Merged

SDA and SCL are flipped #3570

merged 1 commit into from
Oct 19, 2020

Conversation

askpatrickw
Copy link

As per Unexpected Maker SDA and SCL were swapped.

Prior to this change this failed


import busio
import board
from adafruit_bus_device.i2c_device import I2CDevice

DEVICE_ADDRESS = 0x68  # device address of DS3231 board
A_DEVICE_REGISTER = 0x0E  # device id register on the DS3231 board

# The follow is for I2C communications
comm_port = busio.I2C(board.SCL, board.SDA)
device = I2CDevice(comm_port, DEVICE_ADDRESS)

but this worked (device address is specific to your device. I have a BME680 and it was 0x77)

comm_port = busio.I2C(board.SDA, board.SCL)
device = I2CDevice(comm_port, DEVICE_ADDRESS)

With this change, the original sample code works as expected.

@askpatrickw askpatrickw changed the title SDA and SCL were flipped SDA and SCL are flipped Oct 19, 2020
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No testing done.

The CI failures are unrelated.

@jepler jepler merged commit f8d37c0 into adafruit:main Oct 19, 2020
@askpatrickw askpatrickw deleted the UMFeatherS2-SCL-SDA branch October 20, 2020 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants