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

Skewed text with 128x32 OLED #23

Closed
thijstriemstra opened this issue Oct 28, 2016 · 21 comments
Closed

Skewed text with 128x32 OLED #23

thijstriemstra opened this issue Oct 28, 2016 · 21 comments
Labels

Comments

@thijstriemstra
Copy link
Collaborator

I'm testing with a 128x32 OLED and when running the sys_info demo for example, the text is unreadable. The logo example shows a stretched logo. Is there possibly an error in the width/height calculation of the ssd1306 device?

@rm-hull
Copy link
Owner

rm-hull commented Oct 28, 2016

It is possible - maybe quite likely. I have only ever used it on a 128x64 display against the SSD1306 IC, whereupon I got remote help from @xes to get it working on the SH1106 device (see #1).

Is the device you have definitely an SSD1306 ... can you try the SH1106 driver instead (it is in the same module).

Uploaded photo's would help diagnose the problem further.

@thijstriemstra thijstriemstra changed the title Skewed text Skewed text with 128x32 OLED Nov 7, 2016
@thijstriemstra
Copy link
Collaborator Author

I tried SH1106 and it didn't make a difference. It's horrible quality but here's a picture with the sys_info demo (without the 4th wlan line).

img_20161028_171634613

@rm-hull
Copy link
Owner

rm-hull commented Nov 7, 2016

It looks as though it is showing every other line of pixels, as if the memory mapping is interleaved.

As an experiment, can you try setting the height to 64, and run either the demo.py or maze.py examples - these are full screen and might provide further clues as to what is happening.

@thijstriemstra
Copy link
Collaborator Author

thijstriemstra commented Nov 13, 2016

@rm-hull I can sponsor and send you one from ebay, if you can email a shipping address to my committers email address.. 👍 (update: on it's way)

@rm-hull
Copy link
Owner

rm-hull commented Nov 19, 2016

It looks as though the multiplex settings need to be dependent on the height when the class is initialising. See conversation here: http://forum.espruino.com/conversations/269330/

@rm-hull
Copy link
Owner

rm-hull commented Nov 27, 2016

Related issue: #6

rm-hull added a commit that referenced this issue Dec 7, 2016
Note: the SSD1306 chipset is only supported presently - should there be
a need for SH1106 support, that will be addressed later.
rm-hull added a commit that referenced this issue Dec 7, 2016
Note: the SSD1306 chipset is only supported presently - should there be
a need for SH1106 support, that will be addressed later.
@rm-hull
Copy link
Owner

rm-hull commented Dec 7, 2016

Have a branch feature/init_sequence which might provide the correct initialization sequence for 128x32 and 96x16 sized OLED screens.

@thijstriemstra @eudoxos - could you checkout that branch and run:

$ sudo python setup.py install
$ python examples/demo.py --width=128 --height=32

Let me know if that works.

Note that some of the other demos will probably assume height=64 - will aim to fix these up as part of the push into master.

@thijstriemstra
Copy link
Collaborator Author

Will do. I would recommend pip install -e . from the root instead of python setup.py install..

@thijstriemstra
Copy link
Collaborator Author

thijstriemstra commented Dec 7, 2016

@rm-hull it seems everything is still squashed but only the bottom 50% is visible. Master does the exact opposite, only shows top 50%.

@rm-hull
Copy link
Owner

rm-hull commented Dec 7, 2016

Pic?

@thijstriemstra
Copy link
Collaborator Author

Or it didn't happen..? ;) Let me connect pi camera.

@rm-hull
Copy link
Owner

rm-hull commented Dec 8, 2016

Actually .... just pushed another commit, if you could pull, install, try again pls?

@thijstriemstra
Copy link
Collaborator Author

Ok first the pic;
foo

@rm-hull
Copy link
Owner

rm-hull commented Dec 8, 2016

Woudl expect to see:
oled_000001

@thijstriemstra
Copy link
Collaborator Author

But your commit fixed it, nice!! New pic:
foo_awb

The final part of the demo with the scrolling date/time is not fully visible because of height.

@rm-hull
Copy link
Owner

rm-hull commented Dec 8, 2016

👍

will fix up the sizes for the other demos in the next day or so & push it into master.

@thijstriemstra
Copy link
Collaborator Author

thijstriemstra commented Dec 8, 2016

The bounce demo goes nuts, not enough space for these balls.. And first traceback for invaders demo @rm-hull:

$ python examples/invaders.py --width=128 --height=32
Traceback (most recent call last):
  File "examples/invaders.py", line 188, in <module>
    device.display(splash)
  File "/home/pi/projects/pi-test/ssd1306/oled/device.py", line 241, in display
    assert(image.size[1] == self.height)
AssertionError

And great nrs for perfloop: 102.77 FPS

rm-hull added a commit that referenced this issue Dec 8, 2016
Note: the SSD1306 chipset is only supported presently - should there be
a need for SH1106 support, that will be addressed later.
@eudoxos
Copy link
Contributor

eudoxos commented Dec 8, 2016

I tried the init_sequence branch now and I still see random pixels, though with a different pattern. The previous screen (see #70) was and still is with the master branch like this:

random pixels master branch

Now with init_sequence, it looks like this:

random pixels init-sequence branch

Sorry for bad news. Any further diagnostics I can try?

@rm-hull
Copy link
Owner

rm-hull commented Dec 8, 2016

@eudoxos Ok, thanks for the update: lets re-open your original issue, and move the discussion to there instead

@rm-hull rm-hull closed this as completed in 6b13921 Dec 8, 2016
rm-hull added a commit that referenced this issue Dec 8, 2016
Add support for different screen sizes (SSD1306 only) - fixes #23
@rm-hull
Copy link
Owner

rm-hull commented Dec 20, 2016

@thijstriemstra:

I can sponsor and send you one from ebay, if you can email a shipping address to my committers email address.. 👍 (update: on it's way)

Arrived today, and works great ... thankyou

[now I should go back and make sure all the demos work on that screen size]

@thijstriemstra
Copy link
Collaborator Author

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants