How do I tell the RP2040 that I'm using the STEMMA connector (Wire1) for the rotary encoder instead of Wire0.
I would like to drive all of my I2C devices (BMP390, SH1106, and rotary encoder) from the STEMMA connector.
When I run I2C_Scan they all show up on Wire1 while using the STEMMA connector (as they should).
RP2040 Feather and encoder_basic and STEMMA
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- 5600chuck
- Posts: 7
- Joined: Tue Aug 23, 2022 10:58 am
- dastels
- Posts: 15659
- Joined: Tue Oct 20, 2015 3:22 pm
Re: RP2040 Feather and encoder_basic and STEMMA
Look at the code for use of Wire and replace it with Wire1. Often &Wire will be passed to a constructor, pass &Wire1 instead.
Dave
Dave
- 5600chuck
- Posts: 7
- Joined: Tue Aug 23, 2022 10:58 am
Re: RP2040 Feather and encoder_basic and STEMMA
Thanks Dave, for your rapid reply.
In the Arduino Sketch "encoder_basic" there was no instance of Wire.
But I edited Adafruit_seesaw.h by adding #define Wire Wire1 after #include <Wire.h> and that seemed to do the trick.
Thanks again
In the Arduino Sketch "encoder_basic" there was no instance of Wire.
But I edited Adafruit_seesaw.h by adding #define Wire Wire1 after #include <Wire.h> and that seemed to do the trick.
Thanks again
- dastels
- Posts: 15659
- Joined: Tue Oct 20, 2015 3:22 pm
Re: RP2040 Feather and encoder_basic and STEMMA
You should be able to pass &Wire1 in the seesaw constructor. It defaults to using &Wire.
Dave
Dave
Please be positive and constructive with your questions and comments.