Testing on a PICO same code... and get expected output:
Since I do not pass an I2C argument, actually none, I get what I deserve... but clearly, .connectI2c() got invoked... and when trying to write to I2C - variable a in minified code - it fails.
____ _
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|____|___| _|_| |___|_|_|_|___|
|_| espruino.com
2v00 (c) 2018 G.Williams
>
Uncaught Error: Cannot read property 'writeTo' of undefined
at line 1 col 2
a.writeTo(b,c);return a.readFrom(b,d)
^
in function "r" called from line 1 col 72
...;if(this.r(a.CHIP_ID_ADDR,1)!=a.CHIP_ID)throw Error("BME680 ...
^
in function "e" called from line 2 col 5
d])})
^
in function "connectI2C" called from line 1 col 31
bme680 = bme680Mod.connectI2C();
^
in function called from system
>
I suspect/conclude, that something upon reception when Pixl is writing the module to the Modules cache, it fails.
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.
Testing on a PICO same code... and get expected output:
Since I do not pass an I2C argument, actually none, I get what I deserve... but clearly,
.connectI2c()
got invoked... and when trying to write to I2C - variablea
in minified code - it fails.I suspect/conclude, that something upon reception when Pixl is writing the module to the Modules cache, it fails.
1 Attachment