Code Monkey home page Code Monkey logo

Comments (3)

reggi avatar reggi commented on September 28, 2024

@mmoskal I see you wrote some of that c code that runs the image render, any insights here (sorry for the direct ping)

I did a deep dive to see if there was anything I could do in userland but I think my configuration good, the image context from allocate doesn't allow me to fix this AFAIK.

from jacscript.

mmoskal avatar mmoskal commented on September 28, 2024

You want to make sure you initialize the screen correctly. Eg code for 1.14inch picolcd is this:

   const d = new ST7789Driver(Image.alloc(240, 136, 4), {
            dc: pins.GP8,
            cs: pins.GP9,
            reset: pins.GP12,
            // frmctr1: 0x0e_14_ff,
            flip: false,
            spi: spi,
            offX: 40,
            offY: 53,
        })
        await d.init()

You need to make sure you have similar code that matches what's in the vendor's C libraries. Also they say the display is 135px tall, but it's probably 136px; if not that may be a problem

from jacscript.

reggi avatar reggi commented on September 28, 2024

I can render background colors, circles and squares just fine. The only issue is images. I was thinking because if this it wouldn't be my configuration.

Here's my config, looks the same.

spi.configure({
  mosi: gpio(35),
  sck: gpio(36),
  hz: 8_000_000,
})

// backlight led
gpio(38).setMode(GPIOMode.OutputHigh)

const width = 240
const height = 136

const display = new ST7789Driver(Image.alloc(width, height, 4), {
    dc: gpio(34),
    cs: gpio(37),
    reset: gpio(33),
    // frmctr1: 0x0e_14_ff,
    flip: false,
    spi: spi,
    
    offX: 40,
    offY: 53,
})

from jacscript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.