Skip to content

i2c pins #21

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

Closed
ramarro123 opened this issue Sep 20, 2018 · 3 comments
Closed

i2c pins #21

ramarro123 opened this issue Sep 20, 2018 · 3 comments

Comments

@ramarro123
Copy link

Hi,

i suggest to add a constructors parameter for pins for i2c.

it's useful on device like esp8266 where sometimes people need to map pin on different task

void begin(uint8_t addr);
should be
void begin(uint8_t addr, uint8_t sda = 0, uint8_t sclk = 0);

and on begin function
if (sda != sckl)
Wire.begin(sda, sckl);
else
Wire.begin();

of course just a random implementation, but that keep compatibility with the rest of library

@ladyada
Copy link
Member

ladyada commented Sep 20, 2018

if you want to send in a PR, we'd accept one where you pass in a Wire & object to begin(), but not individual pins! thanks :)

@stefboerrigter
Copy link

See #38.

@caternuson
Copy link
Contributor

Closing in favor of #63 . Using BusIO moves the pin assignment issue outside of this library. Instead, an I2C bus will be passed in and use whatever pins it was set up for.

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

No branches or pull requests

4 participants