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
snippet to use it
oled = require("SSD1306S").connect(I2C1,........);
© Espruino, powered by microcosm.
Report a problem