You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
Nothing in return.
var i2c = new I2C(); i2c.setup({ scl : D5, sda: D4 }); var gas = require("CCS811").connectI2C(i2c); setInterval(function() { gas.get(print); //print(gas.get); //gas.on('data', print); }, 3000); var wifi = require("Wifi"); function onInit() { wifi.stopAP(); wifi.connect("INGRIFABSR", {password: "B73vFeX6se2"}, function(err) { if(err)console.log(err);else { print(wifi.getIP().ip);//33 } }); }
Can you try using the code from the examples on http://www.espruino.com/CCS811 ?
print(gas.get);
is very different fromgas.get(print);
- which is what's in the examples.