mirror of
https://github.com/chirimen-oh/node-web-i2c.git
synced 2025-01-18 16:08:06 +00:00
docs: fix undefined variable
This commit is contained in:
parent
3c030c7530
commit
4377f96c58
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ const ADT7410_ADDR = 0x48;
|
|||
|
||||
async function main() {
|
||||
const i2cAccess = await requestI2CAccess();
|
||||
const port = gpioAccess.ports.get(1);
|
||||
const port = i2cAccess.ports.get(1);
|
||||
const i2cSlave = await port.open(ADT7410_ADDR);
|
||||
const temperature =
|
||||
(((await i2cSlave.read8(0x00)) << 8) + (await i2cSlave.read8(0x01))) / 128;
|
||||
|
|
Loading…
Add table
Reference in a new issue