Hi, i'm trying to use you module to connect a raspberryPi with a i2c temperature sensor (sht21)
My problem is that i've got this error when i try to write the first command:
buffer.js:246
switch (encoding && encoding.toLowerCase()) {
^
TypeError: Object 1 has no method 'toLowerCase'
here is my code, it seems that the error is on the length parameter
ar i2c = require('i2c-bus'),
i2c1 = i2c.openSync(1);
Hi, i'm trying to use you module to connect a raspberryPi with a i2c temperature sensor (sht21) My problem is that i've got this error when i try to write the first command:
buffer.js:246 switch (encoding && encoding.toLowerCase()) { ^ TypeError: Object 1 has no method 'toLowerCase'
here is my code, it seems that the error is on the length parameter
ar i2c = require('i2c-bus'), i2c1 = i2c.openSync(1);
var tm = 0x40, bff = new Buffer(4); bff = 0xF3;
i2c1.i2cWrite(tm, 1, bff, function(err, bytesWritten,buffer) { console.log(err); });
thanks