You are reading a single comment by @MaBe and its replies. Click here to read the full conversation.
  • I like to save code to Storage and than require it, this save a big amount of vars.

    Tested with tinyMQTT and a strip down of SSD1306 for I2C only (SSD1306_I2C).

    snippet how to store it

    s = require('Storage');
    // min of SSD1306_I2C saved as  SSD1306S 
    s.write('SSD1306S',"function k(b){.......}";

    snippet to use it

    I2C1.setup({sda:D2,scl:D4, bitrate:200000});
    oled = require("SSD1306S").connect(I2C1,.......­.);

Avatar for MaBe @MaBe started