Avatar for Mrbbp

Mrbbp

Member since Mar 2017 • Last active May 2021
  • 29 conversations
  • 167 comments

I'm newb with espruino, not with arduino, not with js...
But i'm not a coding ninja

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for Mrbbp

    Do you need this at the same time? Because it would potentially be really bad news to attach power to the USB power input and then plug it into your PC as well.

    Not at the same time of course, but the possibility to scratch the paint and uncover the mini usb pads and sold 2 wires seem to be a bit dangerous if i need to plug the usb in my computer to update code.

    there is a samsung travel charger with slim wire in black or white, and is cute and strong enough to power a simple led matrix.

    sorry instagram link to see picture
    https://www.instagram.com/p/COrzei-h9uH/­

  • in Pico / Wifi / Original Espruino
    Avatar for Mrbbp

    Hello,

    i've got a simple question, but sorry for that i found the power section of the pico board a bit confused.

    I would like to power the board with a phone charger, not with a battery.

    On wich pin do you recommand to power the pico (i need to access to usb pad for code update purpose)
    i connect a led matrix (only one 8x8) and need the 5v for the max7219 driver...

    actually, i 've sold a micro usb female deported plug on pin Vout and GND (silkscreened on the back board)
    am i doing it wrong? (sorry for grammar, not sure about that)

    i've tried on the + - battery pad, but curent is not enough on the output a read only 2.7V on the Vout pin...

    regards

    é.

  • in Interfacing
    Avatar for Mrbbp

    Hello @Gordon, sorry for late answer, have to test more to give feedback.

    The optimal 4bits palette does not works.... the display seems to use only the 16MAC Palette even if i iniate with the palette generated by online converter tools.
    I've tried with 2 differents (cheap) displays a 128x128 1.44", and a 1.8" 128x160 from ebay.
    the palette does not works in 4 bits mode.
    and as the screen is initialize with 4 bit palette, the 16bits pictures are wrong color... (even if i modify the cmd(0x36,0xC8), to cmd(0x36,0xC0); (the RGB to BGR bit in the datasheet)
    i don't find a way to initialize the display in 16bits.
    if we remove the palette option, it produces an error.

    regards.

    any help would help.

    é.

  • in Interfacing
    Avatar for Mrbbp

    ok i've found the palette issue...
    the display is RGB16bits not RGB24bits, so the MAC16 Palette look like this with 16bits values:

    var colorPalette = new Uint16Array([
      0x0, 0x4228, 0x8c51, 0xBDD7,
      0x9b26, 0x6180, 0x320, 0x540,
      0x04DF, 0x19, 0x3013, 0xf813,
      0xd800, 0xfb20, 0xffE0, 0xffff]);
    
  • in Interfacing
    Avatar for Mrbbp

    if i use a 2 colors palette on the display

    #0000FF = yellow
    #00ff00 = blue
    #ff0000 = black (no color)
    #ffffff = white

    what's wrong with the color? any advices

    regards

  • in Interfacing
    Avatar for Mrbbp

    well i do not understand wich format can be used to directly loadImage from storage as in exemple!
    is it a bmp file in 1bit? or a what?
    how to put img file in the storage area of the espruino?
    am i wrong, it only works with a sd card module?

    i have to admit, i'm a beat confuse. sorry

    g.drawImage(require("Storage").read("myi­mage.img"), 10, 10);
    
  • in Interfacing
    Avatar for Mrbbp

    it seems there is a rgb to bgr inversion...

  • in Interfacing
    Avatar for Mrbbp

    well i build a MAC16 palette in photoshop as your script does (the online tool)
    now i can export the image "as is".

    the image with the good palette

    Now on my screen, the color does not match.
    what is suppose to be a gray #bbb is purple and the gray #444 is green...
    no matter i change the palette reference by reorganize (in photoshop) the place of each color as in your coded palette...

    oh and i use your palette as the ref palette.
    what's wrong?

    var img = {
      width : 128, height : 128, bpp : 4,
      buffer : require("heatshrink").decompress(atob("m­UzAJIAJmUykMRiAAEiIHDiMiDZQjIGZwAMkURgI5­BABEBgMTFC4AVmJ3EHYgJEU4MSFCqAUn8yOgiAKQ­Ic/DIbFWIxp9BOgL1DAYUARAoJDkY7UPiICBPRQJ­EAgQCBgMCfUpSBkEAHYr/FAAMhQA0Tf8J8BAIMyf­BsRiUSfoQJDgLBBf65+MO4hyCOgYACP4aAFiT/jP­xZyBBgR/CBIgACl7/ikD5HPop/DQAYAEQB4ASfpy­ACP4MiA4KCGf4IBBAAIDDYZJ+Pdoj/LQAILFgCAR­f6JpCQJgNCP4QHEQIZ6LACcwMgRzEAAgLGkQEDBY­kAkaAeNAiADiR8GBIR/FPwkBgSABAIZAXmJ+GAJC­KEkMhPgocBAIJ+cn8hPgb/EAggADPwMSkb9GgCAC­ib+cM4hsFPQqEDkMiP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Uhfoz/HOARx­BQAgBEPwcSPwb/FP5psBkEikB4CfwgCCiJ/DQAaB­BLwj8EBoT+Ff5D9FEIRmBGIJTBPwSAEPwT/CCgRF­BQISICAAQeBCYMSiL+HE4MCP5w/BfpACBDwJ+DAA­R+BAIKKGPwacFf5iAGfwMjPQaDCAAbcBOo4AHfYQ­FCP5AnBiMTfxsSQIL/ELob+BP4YWDGYR2CAAoJCE­IR+Df5oACfwcyLAp/NQBQDDPwYDDEoIBBP5ZEBH4­MxKwj/DPwL0CPwRaEQQiEDA4Z8CAAb/OVQUyiYcB­Pw8RgRrCPw0zQ4MjQRD+Mf5sxDgMgPoh+FNgLZDQ­BKCDAYT8CD4b/GEAT9FP4TbCP4j8EFQT+HQASCDQ­gYCCToSBFPoICBP5hcDLAwZBN4Z9DQA6DIP4SBDf­4kQf5h+BfIZ+GOAgaCn5fIPwYDCLYJ/WmJ8CLYoB­BdIZSDQBh/UEYZ+EmS0CLIIABLQcCPwb1CABILDP­gJ/CkIeCEYIlDPwSnBERRUEK4kAfoRRDDRALDQAY­BBkJ/CQIr/OAILUELATXCiT6EAAj/BAIKCGAAciD­oQAFBAcRgR/KA=="))
    };
    
    function draw() {
      digitalPulse(LED2, true, 20);
      g.clear();
      g.drawImage(img,0,0);
      g.flip();
    }
    var g;
    function onInit() {
      A5.set(); // Backlight On
      var colorPalette = new Uint16Array([
      0x000000, 0x444444, 0x888888, 0xBBBBBB,
      0x996633, 0x663300, 0x006600, 0x00aa00,
      0x0099ff, 0x0000cc, 0x330099, 0xff0099,
      0xdd0000, 0xff6600, 0xffff00, 0xffffff]);
      // 2 couleurs pour la palette
      // init spa
      var spi = new SPI();
      spi.setup({mosi:B15 /* sda */, sck:B13 /* scl */});
      g =require("ST7735").connect({
        palette:colorPalette,
        spi:spi,
        dc:A7,
        cs:B10,
        rst:B1,
        // height : 160 // optional, default=128
        }, draw
      );
    }
    
Actions