Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'send' of undefined [IO plugins support] #122

Closed
aquaminer opened this issue Jun 6, 2017 · 1 comment
Closed

Cannot read property 'send' of undefined [IO plugins support] #122

aquaminer opened this issue Jun 6, 2017 · 1 comment

Comments

@aquaminer
Copy link

Error:

>> /tmp/remote-script/node_modules/tessel-io/lib/index.js:842
      state.i2c[address].send(buffer);
                        ^

TypeError: Cannot read property 'send' of undefined
    at Board.i2cWrite (/tmp/remote-script/node_modules/tessel-io/lib/index.js:842:25)
    at t._transfer (/tmp/remote-script/node_modules/oled-js/oled.js:1:2777)
    at t._initialise (/tmp/remote-script/node_modules/oled-js/oled.js:1:2133)
    at new t (/tmp/remote-script/node_modules/oled-js/oled.js:1:1652)
    at t.<anonymous> (/tmp/remote-script/index.js:1:226)
    at emitNone (events.js:72:20)
    at t.emit (events.js:166:7)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickDomainCallback (node.js:390:13)

Code:

var five = require('johnny-five'),
    Oled = require('oled-js');
var Tessel = require("tessel-io");
var board = new five.Board({
  io: new Tessel()
});
board.on('ready', function() {
  

  var opts = {
    width: 128,
    height: 32,
    address: 0x06
  };

  var oled = new Oled(board, five, opts);
  var font = require('oled-font-5x7');


oled.drawCircle(30, 10, 5, 1);
oled.update();

});

Hello, please tell me how to solve this problem

@noopkat
Copy link
Owner

noopkat commented Jun 18, 2017

hey @opkiler22789 and @rwaldron 😄

I just pushed a fix for this, in a new version of oled-js. I am going to give this a go with my own Tessel 2, but in the meantime can you please test this on your end and let me know if it works? Reopen this issue if you don't find success.

Thanks! ✨

@noopkat noopkat closed this as completed Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants