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

    Framebuf library incomplete ?

    Scheduled Pinned Locked Moved Issues & Bugs
    e-inkframebuflibrarymicropython
    3 Posts 2 Posters 479 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.
    • E Offline
      EchoBravoVictor
      last edited by EchoBravoVictor

      Hi,

      Since 1.6.9.b1, Pycom firmware added framebuf support. I've got LoPy on PySense shield under 1.18.1.r7
      I try to get working a library for e-ink display (https://github.com/mcauser/micropython-waveshare-epaper)
      In this library, they use framebuf as micropython documentation (http://docs.micropython.org/en/v1.9.4/esp8266/library/framebuf.html).

      Here's the code :
      import framebuf
      buf = bytearray(128 * 296 // 8)
      fb = framebuf.FrameBuffer(buf, 128, 296, framebuf.MONO_HLSB)

      I don't understand why, but I get this error :
      AttributeError: 'module' object has no attribute 'MONO_HLSB'

      MONO_HLSB is supposed to be a native framebuf constant's...

      Anyone?

      Thank you
      Amine KHETIM

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

        @echobravovictor The micropython variants differ a little bit, and the PyCom variant is frozen at an older state.
        The constant you need is called MVLSB.

        E 1 Reply Last reply Reply Quote 1
        • E Offline
          EchoBravoVictor @robert-hh
          last edited by

          @robert-hh Working !
          Thank you 😊

          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