Skip to content
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

allow specifying the i2c_bus on neoKey and neoTrellis #63

Merged
merged 3 commits into from
Jan 26, 2022

Conversation

epinzur
Copy link
Contributor

@epinzur epinzur commented Jan 24, 2022

This change is to allow specifying the i2c_bus on neoKey and neoTrellis initialization.

This was done to allow the use of these libraries with boards like the Adafruit Feather RP2040, where the stemma connector is on Wire1 instead of Wire0.

Specifically for use with the Adafruit Feather RP2040, the following is required to use these libraries:

  // setup i2c for Adafruit Feather RP2040
  Wire1.setSDA(2);
  Wire1.setSCL(3);

  //setup neokey on Wire1
  neokey = Adafruit_NeoKey_1x4(NEOKEY_1X4_ADDR, &Wire1);
  neokey.begin()

  // setup neotrellis on Wire1
  trellis = Adafruit_NeoTrellis(NEO_TRELLIS_ADDR, &Wire1);
  trellis.begin()

After the above changes are applied, the examples should work as normal on the Adafruit Feather RP2040 board.

@epinzur epinzur mentioned this pull request Jan 24, 2022
@epinzur epinzur force-pushed the i2c_bus branch 3 times, most recently from eea2373 to 94320de Compare January 24, 2022 11:25
Adafruit_NeoTrellis.h Outdated Show resolved Hide resolved
Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

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

awesome thanks! :)

@ladyada ladyada merged commit fe4b241 into adafruit:master Jan 26, 2022
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.

None yet

3 participants