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.
require("Storage").eraseAll()
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();
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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: