@johntalton/tsl2591

1.0.0 • Public • Published

tsl2591

npm Version GitHub package.json version CI GitHub Downloads Per Month GitHub last commit

A light to digital converter, that has some bells and whistles.

import { I2CAddressedBus } from '@johntalton/and-other-delights'
import { TSL2591, DEFAULT_ADDRESS } from '@johntalton/tsl2591'

const bus = /* byob */
const aBus = new I2CAddressedBus(bus, DEFAULT_ADDRESS)
const device = TSL2591.from(aBus)

await device.setProfile({ enable: true, powerOn: true })

const { ch0, ch1 } = await device.getColor()

Each channel represents the two analog sensors, full spectrum on ch0 and inferred on ch1. via magic, once and deduce the lux value.

Readme

Keywords

none

Package Sidebar

Install

npm i @johntalton/tsl2591

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

10.4 kB

Total Files

5

Last publish

Collaborators

  • johntalton