You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • @user88194 in your case the problem is var g in init - you're defining it locally, so g won't exist when used in start. Try:

    var g;
    function start(){
      g.clear();
      g.drawString("test",0,0);
      g.flip();
    }
    E.on('init', function() { 
      // I2C
      I2C1.setup({scl:D4,sda:D5});
      g = require("SSD1306").connect(I2C1, start);
    });
    
About

Avatar for Gordon @Gordon started