olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.18k stars 1.05k forks source link

Is the library supported on arduino nano rp2040 connect? #2323

Open Mordechay0000 opened 11 months ago

Mordechay0000 commented 11 months ago

I tried to operate my lcd with 'Arduino nano rp2040 connect' and it doesn't work, with 'Arduino uno' it works. Could it be that the library is not supported by rp2040 connect or is there another reason?

olikraus commented 11 months ago

Did you use the https://github.com/earlephilhower/arduino-pico extension?

Mordechay0000 commented 11 months ago

it's not good?:

image
olikraus commented 11 months ago

Well... it should be ok. It is like this: U8g2 will only use the standard calls to the Arduino Framework. From my perspective those calls work in the same way for many different controller types. So I have tested this vor AVR (like Arduino Uno), ARM, Espressor and STM32 architectures. So I2C (wire), SPI and GPIO interfaces are all the same for those architectures and u8g2 does not require any changes for this. It "just" works. In other words, my assumption is, that the above mentioned arduino-pico framework is not (yet) compatbile with all the other frameworks.

The other option might be, that you still have a wire issue with the board...

egnor commented 7 months ago

For reference, there are two Arduino cores for the rp2040 chip (the brains of the Pico): the official Arduino Mbed-based core, and Earle Philhower's community core.

I can confirm that Earle Philhower's core DOES work with u8g2, at least in some configurations, though there are some issues (e.g. https://github.com/olikraus/u8g2/issues/2289). I don't know about using the Mbed-based core. I will say that most of the community considers Earle Philhower's core the superior one.

You can ALSO use u8g2 without ANY arduino core, just using the basic Pico SDK (the chip's foundational library), but you have to write some interface code which as far as I know has not been integrated into the u8g2 distribution (I bet @olikraus would take a PR!), see https://github.com/olikraus/u8g2/issues/2159 for details.