Skip to content

P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for the AMS (TAOS) tcs3x7x RGB Color Sensor

Notifications You must be signed in to change notification settings

avsa242/tcs3x7x-spin

Repository files navigation

tcs3x7x-spin


This is a P8X32A/Propeller 1, P2X8C4M64P/Propeller 2 driver object for AMS's TCS3x7x-series RGB color sensors.

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.

Salient Features

  • I2C connection at up to 400kHz
  • Adjustable sensor gain
  • Optional interrupts (set thresholds, set persistence filter)
  • Power management through sensor's built-in wait timer
  • Adjustable ADC integration time

Requirements

P1/SPIN1:

  • spin-standard-library
  • P1: 1 extra core/cog for the PASM I2C engine (none if bytecode engine is used)

P2/SPIN2:

  • p2-spin-standard-library

Optional:

  • 3rd I/O pin for a white LED used to illuminate sample
  • 4th I/O pin for reading interrupt pin state

Compiler Compatibility

Processor Language Compiler Backend Status
P1 SPIN1 FlexSpin (6.9.4) Bytecode OK
P1 SPIN1 FlexSpin (6.9.4) Native/PASM OK
P2 SPIN2 FlexSpin (6.9.4) NuCode OK
P2 SPIN2 FlexSpin (6.9.4) Native/PASM2 OK

(other versions or toolchains not listed are not supported, and may or may not work)

Limitations

  • TBD

About

P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for the AMS (TAOS) tcs3x7x RGB Color Sensor

Topics

Resources

Stars

Watchers

Forks