Avatar for Mrbbp

Mrbbp

Member since Mar 2017 • Last active Sep 2021
  • 30 conversations
  • 169 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

    Thanks @Robin,
    I started with the same example, but i missed the ‘toString()’ to convert my counter in String in my attempt.

    It works now...

    thanks again.

    Regards

  • in Pico / Wifi / Original Espruino
    Avatar for Mrbbp

    Hello,

    I'm looking for to store a var in a permanent way (power off) and load at start (power on)
    i saw that @Gordon implement a way to store data since 2v05, but the example code is for log datas (implementative way) and it seems a beat complex just for store a counter var.

    have you a simple example to implement a counter (with a long type) storage over power-down?

    I've tried

    var memoire = require("Storage");
    [...]
    let NumPoemeEncours = memoire.read("num"); // numero encours
      if (NumPoemeEncours == null || NumPoemeEncours == undefined  || NumPoemeEncours == "") {
          NumPoemeEncours = 1;
          console.log("numero du poeme inconnu", memoire.read("num"));
          memoire.write("num",NumPoemeEncours);
          console.log("numero du poeme connu", memoire.read("num"));
      }
    console.log("NumPoemeEncours:",NumPoemeE­ncours);
    

    but it does not works!

    what i'm doing wrong?

    thanks for your time.

  • 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

Actions