-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Changing default I2C HW pins on Raspberry Pi Pico RP2040 #2289
Comments
There is a command for this, see the reference manual. |
Did you figure this out? I can't get this to work with Earl's core. Trying: U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(PIN_WIRE0_SCL, PIN_WIRE0_SDA, U8X8_PIN_NONE); which translates to pin 5, 4 respectively, but no output on the display. I switch back to the standard core, and change to PIN_WIRE_SCL, PIN_WIRE_SDA, which are the same values (5,4) and the display works. |
What you need to do is configure
This is because the code in U8g2 to initialize I2C doesn't know how to supply SDA and SCL pins using that core. (In fact, the ONLY Arduino-based system it knows how to do that on is the ESP32. This should probably be clarified and/or improved.) It's important NOT to pass SDA and SCL pins to the constructor on the RP2040 (normally it should be harmless if you've otherwise configured |
I actually like the solution with setSDL and setSCL. |
see also: #2425 |
I'm using Raspberry Pi Pico with earlephilhower arduino-pico core.
And screen SSD1309_128X64 on 12,13 Pins. And this initialization line in the code
U8G2_SSD1309_128X64_NONAME0_F_HW_I2C u8g2(U8G2_R0)
In Arduino IDE, I decided to simply change the default I2C pins in the file. From default 4,5.
Users/User/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0/variants/rpipico/pins_arduino.h
But in PlatformIO I can't do that way, can you tell me how to change them in other way ?
The text was updated successfully, but these errors were encountered: