Use a rs485 communication module

Posted on
of 2
/ 2
  • and yes @Gordon, it's a long text and it is exactly why i work with Espruino,

    . more ram
    . a better api for string manipulation (than arduino) = js,
    . a small form factor!
    . easy to program


  • :) The custom font is slower because Espruino has to unpack it from RAM - in Espruino things sometimes aren't stored in one block of memory to work around fragmentation - so for every access it has to check.

    When using the built-in font it's using very specific, fast code to access flash.

    Did you try the new firmware I linked? That should be a lot faster.

    Actually thinking about it, it seems that atob doesn't create a flat string when it could do.

    You might get faster rendering by doing:

      Graphics.prototype.setFontDennis8 = function() {
        this.setFontCustom(font, 32, widths, 8);

    So basically Dennis8, but with E.toString around atob. I'd be interested to see what difference that makes?

    I'll make a note to improve atob - there's no reason it shouldn't use flat strings, which would be a lot faster and more efficient

  • @Gordon

    timing test

      t = getTime();
      console.log("Draw took ",getTime()-t);

    1v92 FIRMWARE
    with custom font like setFontDennis8 : 0,244
    with custom font simplified : 0,239
    with custom font like setFontDennis8 + E.toString() : 0,154
    with custom font simplifed + E.toString() : 0,155

    with custom font like setFontDennis8 : 0,106
    with custom font simplified : 0,106
    with custom font like setFontDennis8+ E.toString(atob) + : 0,094
    with custom font simplified + E.toString(): 0,094

    therefor best result with:
    . custom firmware
    . E.toString()
    . nothing more with simplified font (only usefull char design)

  • An other issue with the standart 1v92 firmware.
    with the quick setInterval() or serial1.write()
    i'm unable to upload code... upload stall at a point (variable). Have to unplug and plug pico board (1.4b) in bootloader mode and reinstall firmware.

    with your custom firmware it always upload to board
    huge update for me : plug/unplug usb board crash my old macbook Pro (17 mid 2009) -> 1 time/4 unplug :/



  • Great! That's a definite improvement - and I'll see about trying to build the E.toString into atob.

    Very strange about your crash during upload though - I don't know what would have changed. If you're not doing 'save on send' then absolutely everything you do when you upload should get erased just by unplugging and replugging.

  • The crash is not an espruino issue, it's an usb issue, it produce too sometime with arduino...
    Last week i have to update firmware and install my code on 8 Picos.... I've got crashs (with automatic reboot and message) 4 time 😗. For simple and repetitive task, reboot had made it long and stressfull.

    For the upload problem, i don't know, i've discovered the reset() instruction and it seems to resolve the problem (when code use short setInterval()). You're probably right, i just change my process for upload with in first step, a reset(). Have to check

  • The Web IDE should do a reset() automatically before the upload (unless it was turned off in the options?), so I doubt that's you problem.

    However if you have a very short setInterval outside of a function then that would take effect immediately and could keep the Pico too busy to properly process new data?

  • Wow - this looks great!

    found some cheaper flip dots­pe=product

    5x7 FlipDot controller + 5x 1x7 FlipDots for 40€ plus shipping

    to bad no controller on stock :(

  • I've bought it...😎
    I'm in vacation til mid august...
    I'll try when back home

  • Controller back in stock !!!

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

Use a rs485 communication module

Posted by Avatar for Mrbbp @Mrbbp