I think in this case it might have been because you were using I2c1 in the modules before it had been set up?
Possibly even:
I2C1.setup({scl:B6,sda:B7});
var g = require("SSD1306").connect(I2C1);
var bmp = require("BMP085").connect(I2C1);
//... more code here
Would have been fine...
The other issue is that usually you do:
var g = require("SSD1306").connect(I2C1, function(){
...
});
The function gets called when the display is initialised, which is actually after a slight delay.
What you were doing with getting the pressure and then immediately writing to the display might have been trying to send stuff to the display before it had actually initialised.
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.
I think in this case it might have been because you were using I2c1 in the modules before it had been set up?
Possibly even:
Would have been fine...
The other issue is that usually you do:
The function gets called when the display is initialised, which is actually after a slight delay.
What you were doing with getting the pressure and then immediately writing to the display might have been trying to send stuff to the display before it had actually initialised.