Skip to content
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

Pimoroni 128x128 OLED SH1107 offset #803

Closed
jjgarciajz opened this issue Feb 3, 2019 · 18 comments
Closed

Pimoroni 128x128 OLED SH1107 offset #803

jjgarciajz opened this issue Feb 3, 2019 · 18 comments
Milestone

Comments

@jjgarciajz
Copy link

Hello,
First of all thanks for the amazing work with this library :)

I am working with a Pimoroni 128x128 OLED breakout board based on the SH1107 chip connected to a SparkFun Pro Micro 5v. After my first test I noticed the display show quite big X offset.

After reading the issue #501 I've discovered this board doesn't require the 96 pixels X offset that exists in the u8x8_d_sh1107.c file.

So, after changing u8x8_d_sh1107.c lines 374 and 375 to:
/* default_x_offset = / 0,
/
flipmode_x_offset = */ 0,
The display shows contents properly.

I guess I should notify this :)
Kind regards.

olikraus added a commit that referenced this issue Feb 9, 2019
olikraus added a commit that referenced this issue Feb 9, 2019
olikraus added a commit that referenced this issue Feb 9, 2019
@olikraus
Copy link
Owner

olikraus commented Feb 9, 2019

Thanks for the information.

New constructor:
U8G2_SH1107_PIMORONI_128X128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8);

I have created a beta release for this. Can you test the new constructor? Will it work?

You can download the latest U8g2 beta release from here: https://github.com/olikraus/U8g2_Arduino/archive/master.zip

  1. Remove the existing U8g2_Arduino library (https://stackoverflow.com/questions/16752806/how-do-i-remove-a-library-from-the-arduino-environment)
  2. Install the U8g2_Arduino Zip file via Arduino IDE, add zip library menu (https://www.arduino.cc/en/Guide/Libraries).

@olikraus olikraus added this to the 2.25 milestone Feb 9, 2019
@olikraus
Copy link
Owner

olikraus commented Feb 9, 2019

this is part of 2.25 now, but will be moved to 2.26 for testing

@olikraus olikraus modified the milestones: 2.25, 2.26 Feb 9, 2019
@olikraus
Copy link
Owner

Any feedback?

@jjgarciajz
Copy link
Author

jjgarciajz commented Feb 13, 2019 via email

@olikraus
Copy link
Owner

No problem... take you time...

@jjgarciajz
Copy link
Author

Hello, sorry again for the delay.
I've tested the new constructor with sample code provided (graphicstest and spacetrash) and it works perfectly.
If you need me to test anything else more specific just ask.
Thanks!

@olikraus
Copy link
Owner

Thanks for testing.
Will it work with the u8g2 page buffer FlipMode.ino?
The frame should not change and should be visible all the time.
Thanks a lot!

@jjgarciajz
Copy link
Author

The FlipMode.ino code seems to work. Frame is continuously shown and text turns.

Probably is not related (I'm quite new to this) but I've found out any attempt to show Unicode characters it shows the ? character instead.

Please check this short video:
https://youtu.be/Qx4R-vCw4i4

I'm using a SparkFun Pro Micro 5v/16Mhz board.

Regards!

@olikraus
Copy link
Owner

Thanks a lot for the video. I the flipmode example works perfect. Regarding the "?" problem: Which IDE do you use? Which Version of the IDE?

@jjgarciajz
Copy link
Author

I use Arduino IDE v1.8.8 (the latest I think). The problem with unicode characters happened to me with the stable library version too, even before I posted this issue.

@olikraus
Copy link
Owner

hmm strange. I have IDE v1.8.4 here and unicode works without problems with the internal editor. Maybe I should check a later version.

@jjgarciajz
Copy link
Author

Quite strange indeed. I've checked the code of graphicstest and the other unicode examples and the Arduino IDE shows correctly the unicode characters.
I've also tried other uC boards (Arduino Nano, Arduino Uno) with same results.

Do I need to install anything else apart of the library itself? (like fonts, etc...) Maybe I'm skipping something.

Just in case, I will try 1.8.4 and write you back as soon as possible.

@olikraus
Copy link
Owner

No extra software is required. It should work out of the box.

@AnHardt
Copy link

AnHardt commented Feb 17, 2019

Try saving and reloading the sketch.

@jjgarciajz
Copy link
Author

@AnHardt that did the trick!

Before I saw AnHardt's response, I was trying to upload the sketch with my iMac + Arduino IDE 1.8.8 (normally I use a Surface Pro 4 to "play" with UCs). The unicode characters were shown properly this time. I thought it was some issue with the Surface.

Then I tried the Surface Pro again, saving the modified sketch as a new project before uploading, and worked perfectly.

Thanks for the help :)

@jjgarciajz
Copy link
Author

Confirmed the unicode "issue" and the solution provided testing on a third Windows PC.
Apparently on Windows, example sketches that make use of unicode characters need to be saved as a new sketch to upload correctly.
This doesn't seem to happen on Mac or Linux, though.

@olikraus
Copy link
Owner

Hmmm... Never had such a problem on Linux...

@jjgarciajz
Copy link
Author

Yes, as I mentioned, the issue only affects to Windows.

@olikraus olikraus closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants