-
• #2
Great! Thanks! Would you like me to put it in with the Espruino modules, or would you like to do it? instructions here
-
• #3
Here a little example. I clean and reduce a little bit the code. Some var definitions are not needed.
/* Copyright (c) 2014 ToDo */ /* Quick description ToDO */ var C = { ADDRESS : 0x48 // description }; /** * Description */ function TMP102(_i2c) { this.i2c = _i2c; } /** * Description */ TMP102.prototype.getTemperature = function() { var d = this.i2c.readFrom(C.ADDRESS, 2); return (((d[0] << 8) | d[1]) >> 4)*0.0625; }; /** * export */ exports.connect = function (_i2c) { return new TMP102(_i2c); };
-
• #4
I will attempt to add this at the weekend.
-
• #5
Thanks!
I created this module today. It allows Espruino board to interface with a TMP102 temperature sensor. It is accurate down to 0.0625 of a degree.
https://www.sparkfun.com/products/11931