You are reading a single comment by @SergeP and its replies. Click here to read the full conversation.
  • Hi!
    I have tried to use Puck.IR to control my LED Light strip.
    After a few days of mining I have collected commands from remote control.
    But when I have tried to write them to Puck, I have Out of memory.

    After I have removed few commands it starts working. But nearly full memory is used.
    Is it correct? How can I reduce memory usage?
    Working version looks like this:

    
    var cmd={
    On:    [8.97,4.42,0.58,0.52,0.61,0.52,0.58,0.55­,0.58,0.52,0.61,0.52,0.61,0.49,0.61,0.52­,0.58,0.52,0.64,1.59,0.64,1.62,0.58,1.65­,0.61,1.62,0.61,1.65,0.58,1.65,0.61,1.62­,0.61,1.62,0.58,0.52,0.61,0.52,0.61,0.52­,0.58,0.52,0.61,0.52,0.58,0.52,0.61,0.52­,0.58,0.52,0.64,1.59,0.64,1.62,0.58,1.65­,0.61,1.62,0.61,1.65,0.58,1.65,0.61,1.62­,0.58,1.65,0.55],
    Down:  [8.97,4.42,0.58,0.52,0.61,0.52,0.58,0.55­,0.58,0.52,0.61,0.52,0.61,0.52,0.58,0.52­,0.58,0.52,0.64,1.59,0.64,1.62,0.58,1.65­,0.61,1.62,0.61,1.65,0.58,1.65,0.61,1.62­,0.61,1.62,0.58,0.52,0.61,0.52,0.61,1.62­,0.61,1.65,0.58,0.52,0.61,0.49,0.64,0.49­,0.58,0.52,0.61,1.65,0.58,1.65,0.61,0.52­,0.58,0.52,0.61,1.65,0.58,1.65,0.61,1.62­,0.61,1.62,0.58],
    Up:    [9.00,4.39,0.61,0.49,0.64,0.49,0.61,0.52­,0.61,0.49,0.64,0.49,0.58,0.52,0.64,0.49­,0.61,0.52,0.58,1.65,0.61,1.62,0.61,1.68­,0.55,1.65,0.61,1.62,0.58,1.65,0.58,1.65­,0.61,1.62,0.61,1.65,0.58,0.52,0.61,0.49­,0.64,1.62,0.61,0.49,0.61,0.52,0.58,0.52­,0.61,0.52,0.58,0.52,0.61,1.62,0.64,1.62­,0.58,0.52,0.64,1.62,0.58,1.65,0.58,1.65­,0.61,1.62,0.61],
    Set25: [9.00,4.39,0.61,0.49,0.61,0.52,0.58,0.52­,0.61,0.52,0.58,0.55,0.58,0.52,0.61,0.52­,0.58,0.52,0.61,1.62,0.61,1.65,0.61,1.62­,0.58,1.65,0.61,1.62,0.61,1.65,0.58,1.65­,0.61,1.62,0.58,0.52,0.61,1.62,0.58,0.55­,0.58,1.65,0.58,0.55,0.58,0.52,0.55,0.55­,0.61,0.52,0.64,1.59,0.61,0.52,0.61,1.62­,0.58,0.55,0.61,1.62,0.58,1.65,0.61,1.62­,0.61,1.65,0.58],
    Set50: [9.00,4.39,0.61,0.49,0.64,0.49,0.58,0.52­,0.64,0.49,0.64,0.49,0.58,0.52,0.61,0.52­,0.61,0.52,0.58,1.62,0.64,1.62,0.61,1.62­,0.67,1.56,0.61,1.62,0.61,1.65,0.58,1.65­,0.61,1.62,0.61,1.62,0.55,0.55,0.64,1.62­,0.58,1.65,0.58,0.55,0.58,0.52,0.61,0.49­,0.64,0.49,0.61,0.52,0.61,1.62,0.58,0.52­,0.64,0.49,0.61,1.62,0.61,1.65,0.58,1.65­,0.61,1.62,0.61],
    Set75: [9.00,4.39,0.61,0.52,0.61,0.52,0.58,0.52­,0.61,0.52,0.61,0.49,0.61,0.52,0.61,0.49­,0.64,0.49,0.58,1.65,0.61,1.65,0.58,1.65­,0.58,1.65,0.61,1.62,0.61,1.62,0.58,1.65­,0.61,1.62,0.61,1.65,0.58,0.52,0.61,1.65­,0.58,0.49,0.64,1.62,0.58,0.52,0.61,0.52­,0.61,0.52,0.58,0.52,0.61,1.65,0.58,0.52­,0.58,1.65,0.58,0.52,0.61,1.65,0.55,1.68­,0.61,1.62,0.61],
    Set100:[8.97,4.42,0.58,0.52,0.61,0.52,0.­58,0.52,0.61,0.52,0.61,0.49,0.61,0.52,0.­58,0.52,0.64,0.49,0.58,1.65,0.64,1.59,0.­61,1.65,0.58,1.65,0.61,1.62,0.61,1.65,0.­55,1.65,0.61,1.62,0.61,0.52,0.64,1.59,0.­61,1.65,0.58,0.52,0.61,1.62,0.58,0.52,0.­64,0.49,0.61,0.52,0.58,1.65,0.61,0.52,0.­58,0.52,0.61,1.65,0.58,0.52,0.61,1.62,0.­58,1.65,0.61,1.62,0.58],
    Set1:  [9.00,4.39,0.61,0.49,0.61,0.52,0.61,0.52­,0.61,0.49,0.64,0.49,0.58,0.52,0.61,0.52­,0.61,0.52,0.58,1.65,0.61,1.62,0.61,1.62­,0.61,1.65,0.61,1.62,0.58,1.65,0.58,1.65­,0.61,1.62,0.61,0.49,0.61,1.65,0.61,1.62­,0.58,1.65,0.61,0.52,0.58,0.52,0.58,0.55­,0.61,0.49,0.61,1.68,0.58,0.49,0.61,0.49­,0.64,0.49,0.61,1.62,0.64,1.62,0.58,1.65­,0.58,1.65,0.61],
    Set2:  [8.97,4.42,0.61,0.49,0.64,0.49,0.58,0.52­,0.61,0.52,0.61,0.52,0.58,0.52,0.61,0.49­,0.64,0.49,0.61,1.62,0.64,1.62,0.61,1.62­,0.58,1.65,0.58,1.65,0.61,1.65,0.58,1.65­,0.61,1.62,0.58,0.52,0.61,1.62,0.61,1.65­,0.58,0.52,0.61,0.49,0.61,0.52,0.61,0.52­,0.61,0.49,0.64,1.59,0.64,0.58,0.52,0.52­,0.58,1.65,0.61,1.62,0.61,1.65,0.58,1.65­,0.61,1.62,0.58],
    Set3:  [9.00,4.39,0.61,0.49,0.64,0.49,0.58,0.52­,0.61,0.52,0.64,0.49,0.58,0.52,0.61,0.52­,0.58,0.55,0.58,1.65,0.61,1.62,0.61,1.65­,0.58,1.65,0.58,1.62,0.61,1.65,0.58,1.65­,0.61,1.62,0.61,0.49,0.64,0.49,0.58,1.65­,0.64,0.49,0.58,1.65,0.61,0.52,0.58,0.52­,0.61,0.52,0.70,1.52,0.61,1.62,0.58,0.52­,0.64,1.62,0.58,0.52,0.61,1.65,0.58,1.65­,0.61,1.68,0.55],
    Set4:  [9.00,4.42,0.58,0.52,0.61,0.52,0.58,0.52­,0.61,0.52,0.61,0.49,0.61,0.52,0.61,0.49­,0.64,0.49,0.61,1.62,0.61,1.62,0.61,1.65­,0.58,1.65,0.61,1.62,0.58,1.65,0.58,1.65­,0.64,1.62,0.58,0.52,0.61,0.52,0.58,0.52­,0.58,1.68,0.58,0.52,0.61,0.49,0.61,0.52­,0.58,0.52,0.64,1.62,0.58,1.65,0.61,1.62­,0.61,0.52,0.58,1.65,0.61,1.62,0.58,1.65­,0.64,1.62,0.58]
    };
    

    and after I send it to Puck.js process.memory() output is:

    
    >process.memory()
    ={ "free": 481, "usage": 1519, "total": 2000, "history": 315,
      "stackEndAddress": 536917896, "flash_start": 0, "flash_binary_end": 471892, "flash_code_start": 479232, "flash_length": 524288 }
    
About

Avatar for SergeP @SergeP started