Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Change text size on OLED display 128x64

    Scheduled Pinned Locked Moved WiPy 2&3
    6 Posts 2 Posters 1.8k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      marcosidialgmx
      last edited by

      Hello,

      Is there any way to change the text size on a OLED display 128x64 ?

      I am working with a Wipy 3.0 and and Oled display 128x64. At the moment I can display texts on the display without any problem, but I would like to change the text size. The ssd1306 module that I am using does not support any parameter to change the font size.

      This the ssd1306 that I am using:
      https://github.com/adafruit/micropython-adafruit-ssd1306

      Any help (code) would be appreciated.

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @marcosidialgmx
        last edited by robert-hh

        @marcosidialgmx Peter Hinch has made a lot of work in transposing standard font in data formats which can be used by a microython device. https://github.com/peterhinch/micropython-font-to-py
        That consists of two parts:

        • a font converter, which converts a ttf or otf font file into a python script. That one would run on a PC
        • a writer class, which writes a Python-coded font to a display, using the framebuf class. Since this is written for a different variant of MicroPython, you may have to adapt that a little bit. Mostly for the constants used by the framebuf class.
        M 1 Reply Last reply Reply Quote 0
        • M Offline
          marcosidialgmx
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • M Offline
            marcosidialgmx @robert-hh
            last edited by

            @robert-hh Thanks. I took a look and it's a great works by Peter Hinch.

            I tried to test the code, but I get errors with the following framebuf methods: blit(), line(), vline(), and hline().

            I am using a Wipy 3, version='v1.8.6', release='1.7.0.b1'

            Could a firmware upgrade (wipy v1.18.2) solve the problem with the framebuf methods?

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @marcosidialgmx
              last edited by robert-hh

              @marcosidialgmx I no not know whther the firmware update will not solve that. If I compare the blit documentation with PyCom's implementation (Pycom does not document frambuf), it looks equivalent. What error do you get?

              Edit: There were changes in Nov 2018, so updating to 1.18.2 is definitely useful. For other reasons too.

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                marcosidialgmx @robert-hh
                last edited by

                @robert-hh Ok. I will do it.

                Thanks.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom