SSD1306 OLED Issues

#1

Hi,
I`m trying to get SSD1306 to work - tried the adafruit library first but it does not compile at all:


And now i’m stuck with:

Which does compile but it doesnt do anythign for me, the only function i am able to use is the invertDisplay that is making OLED eithter black or white ( so at least it proves that my wiring is ok ).
There isno example on how one can display a simple text - does anyone tried to use this library in the past ?
How do i draw a simple text ? My curent code:

load('api_timer.js');

load('api_ssd1306_i2c.js');

load('api_i2c.js');

load('api_sys.js');

load('api_config.js');

// Initialize i2c display and show text

SSD1306.init();

SSD1306.drawString(10, 10, 'Sample Text', 1, 0);

I`m getting folowing error on the above attempt to draw a string:

[Jun 1 01:26:09.565] MJS error: failed to call FFIed function: got 4 actuals, but function takes 6 args

#2

Looks like drawString here should call _drawString() instead of _drawStringColor().
However, you are passing 5 arguments to a function which requires 3 arguments; use drawStringColor() instead.

#3

If you are specific, someone here will point you in the right direction or submit a PR to fix the issue.
I avoid Arduino stuff so don’t count on me.

#4

Thanks so much again for your replies so far - with you pointer i was able to launch this library and now it works fine !
As far as no compiling goes - it was my mistake of trying to build two ssd1306 libraries within the same yaml file - they were confliciting with each other so the minut ei`ve rmeoved on of them it compiled without any issues.