I2C1.setup({scl:B6,sda:B7, bitrate: 60000});
var mcp = require("MCP9808").connect(I2C1, 0b000); // 0b000 means A2 = A2 = A1 = GND
var temperature = mcp.getTemperature();
console.log("Temperature: " + temperature + " C");
but I get this error:
in function called from system
Uncaught Error: Cannot read property 'getTemperature' of undefined
at line 10 col 22
var temperature = mcp.getTemperature();
^
in function called from system
Uncaught Error: Cannot read property 'getTemperature' of undefined
at line 10 col 22
var temperature = mcp.getTemperature()
what is missing?
do I need to download something?
Thanks,
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.
Hello ,
I have bought the MCP9808 and connect it
copy the code from here:
but I get this error:
what is missing?
do I need to download something?
Thanks,