Avatar for JumJum


Member since Oct 2013 • Last active Sep 2023
  • 157 conversations

Most recent activity

  • in ESP32
    Avatar for JumJum

    I agree, ESP32 with ESP-IDF eats memory like crazy.

  • in ESP32
    Avatar for JumJum

    I only have in mind a problem if wifi and BLE, both are switched off

  • in ESP32
    Avatar for JumJum

    Based on my experience, ESP32 eats memory, RAM and Flash, like crazy.
    This became more and more with each new version of ESP-IDF
    If you need to have WIFI and BLE, I would recommend ESP32 with additional memory

  • in JavaScript
    Avatar for JumJum

    Hmm, I tried to figure out, how to use graphicsInternal, .....
    and found only something in lcd_st7789-8bit where setPixel is not set again.

    Next try was to add JSGRAPHICSTYPE_OTHERS in JsGraphicsType (graphics.h)
    and an if-statement in graphicsSetCallbacks(graphics.c) to skip xxxSetCallbacks.
    In my own driver, this worked fine, but in all functions from jswrap_graphics(for example setPixel) I've got runtime error. Looks to me like setCallback is necessary (?)

    My actual solution for my problem is to add a weak function for JSGRAPHICSTYPE_OTHERS, which can be overroled in my driver. My driver for ILI9341 now is much faster compared to JS-solution.

    See following sources.
    If this is of interest for Espruino, I would create a pull request.


    typedef enum {
      JSGRAPHICSTYPE_ARRAYBUFFER, ///< Write everything into an ArrayBuffer
      JSGRAPHICSTYPE_JS,          ///< Call JavaScript when we want to write something
      JSGRAPHICSTYPE_FSMC,        ///< FSMC (or fake FSMC) ILI9325 16bit-wide LCDs
      JSGRAPHICSTYPE_SDL,         ///< SDL graphics library for linux
      JSGRAPHICSTYPE_SPILCD,      ///< SPI LCD library
      JSGRAPHICSTYPE_ST7789_8BIT, ///< ST7789 in 8 bit mode
      JSGRAPHICSTYPE_MEMLCD,      ///< Memory LCD
      JSGRAPHICSTYPE_LCD_SPI_UNBUF, ///< LCD SPI unbuffered 16 bit driver
      JSGRAPHICSTYPE_OTHERS  ///< Driver that support callbacks only
    } JsGraphicsType;
    bool graphicsSetCallbacksOthers(JsGraphics *gfx);


    /// Set up the callbacks for this graphics instance (usually done by graphicsGetFromVar)
    __attribute__((weak))bool graphicsSetCallbacksOthers(JsGraphics *gfx){
      return false;
    bool graphicsSetCallbacks(JsGraphics *gfx) {
      if(gfx->data.type >= JSGRAPHICSTYPE_OTHERS){
    	return graphicsSetCallbacksOthers(gfx);

    Last not least in myOwnDriver.c:

    bool graphicsSetCallbacksOthers(JsGraphics *gfx){
      gfx->setPixel = myOwnCallbackSetPixel;
      gfx->fillRect = myOwnCallbackFillRect;
      return true;
  • in JavaScript
    Avatar for JumJum

    Looks like on each call of graphicsGetFromVar, graphicsSetCallbacks is called.
    So its called very often.
    My expectation was to set callbacks (fillRect, setPixel) only once during initialisation.
    This would add an option to write my own drivers in C, which only set fillRect and setPixel.

  • in News
    Avatar for JumJum

    Are there any plans to visit other events ?

  • in Porting to new Devices
    Avatar for JumJum

    Good news

    • got a pico w
    • got it connected from Espruino to my wireless
      Bad news
    • don't get my hands on a http-server. There is a first step in Github, but my understanding is poor. My way right now is a mix of trial/error and copy/paste

    BTW, Gordon already offered to help changing from cmake to espruino like make, once the port is kind of stable. For me this port is having some fun, don't have to make money for the family.

  • in Projects
    Avatar for JumJum

    Well.. could be me ;-)

    May be, this can help for audio output http://forum.espruino.com/conversations/­363093/#comment15963863
    I used it for some simple speech, but it can be used for sound, music etc.
    last not least its cheap.