• Hi there this maybe a stupid question, but I haven't been able to find the answer anywhere online.
    I'm trying to display the Mandelbrot set on the screen of the bangle.js watch. So I need to be able to set the color value of each pixel individually.
    Here's what I tried so far:
    Make a nested for loop to go through every row and use the g.setPixel method to display the pixels.
    I read about the Bangle.setLCDMode('doublebuffered') and used g.flip() after.
    But when I try to run it everything just crashes, even when I just set every pixel to 0.
    Then I tried to fill a buffer as shown in the Graphics.buffer doc example, but that kinda didn't work either.
    So every help and starting point would be greatly appreciated.

  • Mon 2021.04.05

    Hi @user126981 you are on the right track. Without a sample code block it will be difficult to make a suggestion on where to start.

    post #2 at copy/render part of an image

    Points to an example at:

    post #8 and #10 full-screen background image

    with a working emulator example.

    Bangle.setLCDMode("120x120") in emulator

    Should additional assistance be required, please upload your code so far by pressing the < / >code button just to the top right of the reply window.

  • Hi @Robin,
    thanks for the support the last one was exactly what I was looking for!
    Have a good one :)

  • Just to add, it might help to just use g.setColor(...).fillRect(x,y,x+1,x+1) (without a different screen mode) for something like Mandelbrot - then it'll update the screen as and when the data is calculated.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Set each pixels color individually on Bangle.js screen

Posted by Avatar for user126981 @user126981

Actions