Avatar for David1234321

David1234321

Member since Apr 2020 • Last active Apr 2021
  • 12 conversations
  • 58 comments

First time user of this - seem very cool

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    Thanks !
    I will give it a try

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    no
    the device is connected using serial TX\RX pins to a serail device that connect to the internet .
    If I choose the COM of the device from my computer on the IDE - I can upload\see the MDBT42 .
    my question is if I can upload new code not using the IDE \ using some kind of API
    or maybe (just thought about it) send a command to the MDBT42 and tell him to download a new code ?
    is there such a thing?
    ** No is also a good answer :-)

    Thanks ,

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    the device is not near the computer
    I want to be able to uplaod\ chhange the code from another palce \ remote location

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    Hello,
    wanted to know if there is a way to upload the code not using IDE ?
    or somehow to intigrate it into my website using API ?

    I'm using the MDBT42 only as a beacon - and I want to be able to change it's name when ever I want to

    is this somthing reasonable to do ?
    is there any way to do it?

    *** I have created a virtual com to the device and using the webIDE I can uplaod to him the wanted code , so no netwrok issue
    Thanks ,

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    wellll
    it's seem that I had some problem in the computer that block me some websites......

    I have try with another computer - and everything start to work

    what a waste of a day!

    so now its working and read the data every 10 seconds

    Thank you for the help!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    the computer is connected all the time to the internet

    1. where it load the module , maybe something happand to the server?
    2. if there was a problem , how could I upload the code before? what have change?

    Thanks ,

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    I don't know what to say:

    I have try to upload the code you posted(I'm write it so you will see no errors)

    var mcp;
    function onInit() {
      clearInterval();
      I2C1.setup({scl:D25,sda:D26, bitrate: 60000});
      mcp = require("MCP9808").connect(I2C1, 0b000);
      console.log("I2C Setup Finsih");
      ReadTemp();
    }
    function ReadTemp() {   
      setInterval (function() {
        digitalWrite(LED1,0);
        var temperature = mcp.getTemperature();
        var TimeStemp = new Date().toString();
        console.log(TimeStemp + "  :  " + "Temperature: " + temperature + " C");
        setTimeout(function(){
          digitalWrite(LED1,1);
        },5000);
      } , 10000);
    }
    
    onInit();
    

    this is what I get :

    >
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v07 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    Running onInit()...
    Uncaught Error: Module MCP9808 not found
     at line 3 col 26
      mcp = require("MCP9808").connect(I2C1, 0b000);
                             ^
    in function called from system
    

    both on RAM\Flash uplaod

    what is wrong now?

    update*
    I get the same error when I try to uplaod my own code that works before

  • in Puck.js, Pixl.js and MDBT42
    Avatar for David1234321

    2 questions:

    1. to uplaod the new code on FLASH , right?
    2. run "require("Storage").eraseAll()"
      anyway before uplaod the code?

    *** update
    when I run the erase I get this

    require("Storage").eraseAll()
    =undefined
    

    Thanks ,

Actions