We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm using an RP2040 - specifically the Waveshare RP2040 Zero
This sketch does NOT work (nothing on the display):
#include <Arduino.h> #include <U8g2lib.h> U8G2_SSD1309_128X64_NONAME0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, 13, 12); void show() { static constexpr uint8_t x = 5; static constexpr uint8_t y = 30; const String msg = "Hello World!"; u8g2.clearBuffer(); u8g2.setFont(u8g2_font_6x13_tr); u8g2.drawStr(x,y,msg.c_str()); u8g2.sendBuffer(); } void setup() { u8g2.begin(); show(); } void loop() { }
And this sketch DOES work:
#include <Arduino.h> #include <U8g2lib.h> #include <Wire.h> U8G2_SSD1309_128X64_NONAME0_F_HW_I2C* u8g2; void show() { static constexpr uint8_t x = 5; static constexpr uint8_t y = 30; const String msg = "Hello World!"; u8g2->clearBuffer(); u8g2->setFont(u8g2_font_6x13_tr); u8g2->drawStr(x,y,msg.c_str()); u8g2->sendBuffer(); } void setup() { Wire.setSCL(13); Wire.setSDA(12); Wire.begin(); u8g2 = new U8G2_SSD1309_128X64_NONAME0_F_HW_I2C(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); u8g2->begin(); show(); } void loop() { }
I am wondering if you have any idea why I cannot re-map the pins through the constructor.
Thank you,
Mike
The text was updated successfully, but these errors were encountered:
Indeed remapping is not supported for the RP2050.
I don't have access to an RP2040, but indeed there had been issues in the past, maybe you can check existing issues: https://github.com/olikraus/u8g2/issues?q=is%3Aissue+RP2040
As a workaround, I suggest to use SW I2C:
U8G2_SSD1309_128X64_NONAME0_F_SW_I2C u8g2(U8G2_R0, 13, 12, /* reset=*/ U8X8_PIN_NONE);
Edit: Fixed constructor args
Sorry, something went wrong.
No branches or pull requests
Hello,
I'm using an RP2040 - specifically the Waveshare RP2040 Zero
This sketch does NOT work (nothing on the display):
And this sketch DOES work:
I am wondering if you have any idea why I cannot re-map the pins through the constructor.
Thank you,
Mike
The text was updated successfully, but these errors were encountered: