You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Try running require("Storage").eraseAll() just to ensure that nothing gets left in storage that shouldn't be there. That might help you a little.

    Since RAM obviously works for you and you seem happy with that, try:

    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();
    
About

Avatar for Gordon @Gordon started