-
Here is a simple test program to check out .96" oled displays. If I connect the display to GPIO 16/17 and enable I2C0, it works. But if I move the display to GPIO 18/19 and enable I2C1, the display remains blank. I've tried other legal I2C1 pin combinations with the same result - I2C0 always works and I2C1 never works. I can't see where I'm doing anything wrong so really would appreciate any suggestions, thanks. #include <SPI.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels // I2C pins are defined in Raspberry Pi Pico pins-arduino.h file for mbed Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); void setup() { // i2c1 does not work |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm not seeing your code tell the display library to use |
Beta Was this translation helpful? Give feedback.
-
Thank you! That never occurred to me, but now I know the proper usage. |
Beta Was this translation helpful? Give feedback.
Yep. It looks like this line would need to be changed, to use Wire1 instead:
Try changing &Wire to &Wire1.