Skip to content

Commit

Permalink
lib: Prefer abandonware/i2c
Browse files Browse the repository at this point in the history
Change-Id: I09b302a0f30016a65b16433b7ad12138dfd0ac75
Relate-to: kelly/node-i2c#90
Origin: https://github.com/abandonware/bh1750
Relate-to: miroRucka#25
Forwarded: https://github.com/miroRucka/bh1750/pulls
Signed-off-by: Philippe Coval <rzr@users.sf.net>
  • Loading branch information
rzr committed Feb 24, 2020
1 parent a75a2b1 commit 6ef290a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bh1750.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
var console = require('console');
var i2c = require('i2c');

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

var BH1750 = function (opts) {
this.options = opts || {
Expand Down

0 comments on commit 6ef290a

Please sign in to comment.