You are reading a single comment by @David1234321 and its replies. Click here to read the full conversation.
  • 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

About