Avatar for SergeP

SergeP

Member since Nov 2016 • Last active May 2017
  • 5 conversations
  • 7 comments

Most recent activity

  • in Puck.js
    Avatar for SergeP

    Hi Gordon,

    I am new in BLE usage.
    I've found (in BLE standard) something about Scan Responce requests, which may be used to send some data to BLE device in advertising mode, without connection. I think it may be useful to save battery (and may be not, depending of implementation).
    Does Puck.js have possibility to receive these requests? Is it really useful to save battery compared to work in connected mode?

    • 3 comments
    • 85 views
  • in Puck.js
    Avatar for SergeP

    Thank you! It works! Overall memory usage is 6 times less!

  • in General
    Avatar for SergeP

    Hi!
    I'd want to change Blockly version to last one - it has many useful features (and it have much better translation to Russian, I've already backported it to current espruino-server).
    last Blockly version have good interface to design custom blocks. It is critical feature to use espruino for children to study programming. I want to implement few custom blocks to control devices before each lesson.
    Also I am going to change some Espruino blocks (like setWatch) to make it looks more usual, like event processing blocks in Scratch and Blockly games.
    One problem is that last Blockly stores some data in JSON files instead of JS.
    Second one is that there is no easy-to-use build system to integrate these Blocky changes to espruino-server.

    My goal is to combine/build some environment (boards, tools etc.) to children (my children, but not only) can program some automation and/or easy robots the same way as in Scratch/blockly games/code studio.

    JS itself looks to be too hard for small children, while Blockly seems to be very good choice. Even youngest one (less then 4 years old) can solve most of code studio course 2 tasks.

  • in Puck.js
    Avatar for SergeP

    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 }
    
  • in General
    Avatar for SergeP

    Sorry for late answer.
    I have attached message from espruino-server.
    I have it about 1 per 5 reconnections. It seems that pauses does not matter.

  • in General
    Avatar for SergeP

    I have few Puck.js devices and have not any recommended devices for WEB IDE. So I've tried to use C.H.I.P board (it is Kickstarter project, now on getchip.com) the same way as documented for Raspberry. It works!
    So now I have very chip server ($9) for Puck.js devices. I think it may be good solution for many people.

    Some problems: Projects button does not work, espruino-server often closes with error after disconnect. But all of them are not fatal to use Puck.js.

Actions