Dia antes primera install

This commit is contained in:
2025-12-08 15:20:28 -06:00
commit 1416478c9c
4130 changed files with 886376 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
'use strict';
const lodash = require('lodash');
const assert = require('assert');
const i2c = require('../');
const bus = i2c.openSync(1);
let count = 0;
const next = _ => {
const addresses = bus.scanSync();
bus.scan((err, devices) => {
assert(!err, 'can\'t scan for devices');
assert(lodash.isEqual(addresses, devices), 'sync and async scan differ');
count += 1;
if (count % 10 === 0) {
console.log(count);
}
next();
});
};
next();