This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for the ams AS7341
IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.
- I2C connection at up to 400kHz
- Read sensor data (ADC words)
- External LED control: power on/off, set drive strength
- Set ADC integration time
- Interrupts: set mask, threshold, source channel, sleep-after, read source(s), clear, sleep after interrupts, duration/persistence
- FIFO ops: flush, set interrupt threshold, data source, get number of unread entries, read data
- Flicker detection: set gain, enable AGC, AGC max level, detection time, interrupt persistence
- Spectral engines: set gain, enable AGC, AGC max level, hysteresis, auto-zero (initiate manually, or set periodic)
- Read status/flags: sensor saturation status, fifo overrun, flicker-detection error, initialization/busy, over-temperature error, spectral engine trigger error
- Sensor SMUX configuration, write commands, registers
P1/SPIN1:
- spin-standard-library
P2/SPIN2:
- p2-spin-standard-library
Processor | Language | Compiler | Backend | Status |
---|---|---|---|---|
P1 | SPIN1 | FlexSpin (6.9.4) | Bytecode | OK |
P1 | SPIN1 | FlexSpin (6.9.4) | Native/PASM | Build OK, runtime bad |
P2 | SPIN2 | FlexSpin (6.9.4) | NuCode | Not yet implemented |
P2 | SPIN2 | FlexSpin (6.9.4) | Native/PASM2 | Not yet implemented |
(other versions or toolchains not listed are not supported, and may or may not work)
- Very early in development - may malfunction, or outright fail to build
- Method names and API should be considered unstable/tentative