Just did this with a SSD1306 OLED and an HD44780 16x2 LCD:
I2C1.setup({scl:B6,sda:B7});
var g = require("SSD1306").connect(I2C1, function(){
// write some text
g.drawString("Hello World!",2,2);
// write to the screen
g.flip();
}
);
var lcd = require("HD44780").connectI2C(I2C1);
lcd.print("Hello World!");
It's as easy as just setting I2C up once, and then using it multiple times.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just did this with a SSD1306 OLED and an HD44780 16x2 LCD:
It's as easy as just setting I2C up once, and then using it multiple times.