-
• #2
The code there is ok for setting up I2C on the MDBT42Q, but without knowing anything about your OLED it's hard to help you.
Espruino has some libraries to connect to common OLED displays though, so if you have one of them ( https://www.espruino.com/Search?kw=oled ) then all you have to do is use the instructions and code there
-
• #3
I'm using this device
128×64 OLED display module (SSD1306) , I will tryjust to be ready
if I take the code:function start(){ // write some text g.drawString("Hello World!",2,2); // write to the screen g.flip(); } // I2C I2C1.setup({scl:B6,sda:B7}); var g = require("SSD1306").connect(I2C1, start);
it's should work ?
will change it to print if someone is connected or notThanks ,
-
• #4
Yes, that should work based on https://www.espruino.com/SSD1306 - but obviously you'll want to change the pin numbers to the pins you have used.
You could also try:
// ... var i2c = new I2C(); i2c.setup({ scl : D20, sda: D19 }); var g = require("SSD1306").connect(i2c, start);
which uses software I2C - either should work
-
• #5
Obviously :-)
it's working
thanks,
Hello,
I'm trying to connect an Oled to my MDSB42Q - so it show messages on connect\disconnect
is the setup OK?
and how do I send to him text
is there a library to download \ use?
Thanks ,