Tiny4kOLED icon indicating copy to clipboard operation
Tiny4kOLED copied to clipboard

Add SH1106 132x64 display support

Open Deoptim opened this issue 4 years ago • 12 comments

Hello. I post this adapted library (ad58375 on Aug 29) for the SH1106 controller. Made it possible not to use (delete) unsupported functions if the parameter "#define SH1106" is defined in the Tiny4kOLED_common.h file. Applicable for SH1106 controller as there are slight differences from SSD1306. I made this library for myself. Thanks. Tiny4kOLED-ad58375.zip

Deoptim avatar Dec 27 '20 08:12 Deoptim

Hello. I post this adapted library (ad58375 on Aug 29) for the SH1106 controller. Made it possible not to use (delete) unsupported functions if the parameter "#define SH1106" is defined in the Tiny4kOLED_common.h file. Applicable for SH1106 controller as there are slight differences from SSD1306. I made this library for myself. Thanks. Tiny4kOLED-ad58375.zip

how can use your castum library? i use inport your library and used sh1106 display not chenged? The corner of the combo image still has pixel clutter Uploading 16521336580755597869875827660376.jpg…

hameed-maleki avatar May 09 '22 22:05 hameed-maleki

Uploading Screenshot_2022-05-10-02-53-55-016_com.miui.gallery.jpg…

hameed-maleki avatar May 09 '22 22:05 hameed-maleki

@hamedmalekii Hello, Are you use this initial sequence:

oled.begin(132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64);
oled.clear();
oled.on();
oled.init();

?

Note that the width here is 132 instead of 128...

Deoptim avatar May 10 '22 05:05 Deoptim

@hamedmalekii Hello, Are you use this initial sequence:

oled.begin(132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64);
oled.clear();
oled.on();
oled.init();

?

Note that the width here is 132 instead of 128... I did not use this command. My DISPLAY is SH1106 128 X 64 pixels, but I still need the command Can I enter a132 pixel?

hameed-maleki avatar Jun 01 '22 23:06 hameed-maleki

@hamedmalekii Hello, Are you use this initial sequence:

oled.begin(132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64);
oled.clear();
oled.on();
oled.init();

?

Note that the width here is 132 instead of 128...

I use this order (132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64); but the display is upside down Is there a way to solve it?

hameed-maleki avatar Jun 08 '22 18:06 hameed-maleki

@datacute i use this order (132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64); but the display is upside down Is there a way to solve it? #

hameed-maleki avatar Jun 20 '22 23:06 hameed-maleki

@hamedmalekii Hello, Are you use this initial sequence:

oled.begin(132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64);
oled.clear();
oled.on();
oled.init();

?

Note that the width here is 132 instead of 128... @datacute hi i use this order (132, 64, sizeof(tiny4koled_init_132x64), tiny4koled_init_132x64); but the display is upside down Is there a way to solve it?

hameed-maleki avatar Jun 21 '22 00:06 hameed-maleki

@hamedmalekii The first thing I advise you to do is to check the display that it works at all - on Arduino with some library and take an example of rendering.

Oled

There, by default, this SH1106 display is already selected. SDA and SCL are standard for Arduino

GyverOLED

Or this, also by default used SH1106

Deoptim avatar Jun 21 '22 08:06 Deoptim

@hamedmalekii are you using Deoptim's code or the latest version of my code? The latest version of my code will probably mostly work if you use the begin method that specifies the offsets and size, but use the init sequence for the 128x64 SSD1306:

oled.begin(2, 0, 132, 64, sizeof(tiny4koled_init_128x64), tiny4koled_init_128x64);

There is also a function to rotate 180 degrees:

oled.setRotation(1)

(try both 1 and 0)

datacute avatar Jun 22 '22 04:06 datacute

@hamedmalekii are you using Deoptim's code or the latest version of my code? The latest version of my code will probably mostly work if you use the begin method that specifies the offsets and size, but use the init sequence for the 128x64 SSD1306:

oled.begin(2, 0, 132, 64, sizeof(tiny4koled_init_128x64), tiny4koled_init_128x64);

There is also a function to rotate 180 degrees:

oled.setRotation(1)

(try both 1 and 0)

thanks i try it

hameed-maleki avatar Jun 25 '22 00:06 hameed-maleki

@hamedmalekii are you using Deoptim's code or the latest version of my code? The latest version of my code will probably mostly work if you use the begin method that specifies the offsets and size, but use the init sequence for the 128x64 SSD1306:

oled.begin(2, 0, 132, 64, sizeof(tiny4koled_init_128x64), tiny4koled_init_128x64);

There is also a function to rotate 180 degrees:

oled.setRotation(1)

(try both 1 and 0)

dont work after use oled.setRotation(1) i have this error

exit status 1 expected ';' before 'oled'

hameed-maleki avatar Jul 30 '22 23:07 hameed-maleki

This issue clearly appears to be a missing ; on the line immediately preceding that line. It has likely been solved by now, and is probably closable.

SpenceKonde avatar Feb 27 '23 10:02 SpenceKonde