first commit

This commit is contained in:
pandacraft 2025-03-21 16:04:17 +01:00
commit a5a0434432
1126 changed files with 439481 additions and 0 deletions

View file

@ -0,0 +1,20 @@
var I2cSensor = require('./base/i2cSensor')
var commands = require('../commands')
function RtcI2cSensor() {
I2cSensor.apply(this, Array.prototype.slice.call(arguments))
}
RtcI2cSensor.prototype = new I2cSensor()
RtcI2cSensor.prototype.read = function() {
var write = this.board.writeBytes(commands.rtc_getTime.concat([commands.unused, commands.unused, commands.unused]))
if (write) {
this.board.wait(100)
this.board.readByte()
return this.board.readBytes()
} else {
return false
}
}
module.exports = RtcI2cSensor