Skip to content

Commit

Permalink
Prefer abandonware i2c
Browse files Browse the repository at this point in the history
Legacy i2c will be used by IoT.js runtime

Change-Id: Ifc2df3f9567f85d21c121c0bcc129b72e7d3f895
Forwarded: bbx10#3
Relate-to: kelly/node-i2c#97
Signed-off-by: Philippe Coval <rzr@users.sf.net>
  • Loading branch information
rzr committed Jan 15, 2020
1 parent c1d8a7c commit 32976ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

var i2c = require('i2c');
var fs=require('fs');
var i2c = null;
try {
i2c = require('@abandonware/i2c');
} catch(err) {
i2c = require('i2c');
}

var MAX_TEMP_CONVERSION = 50; // milliseconds
var MAX_HUMI_CONVERSION = 16; // ms
Expand Down

0 comments on commit 32976ad

Please sign in to comment.