GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - owainm713/TCS34725-Python-Module: TCS34725 colour sensor Python module

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
TCS34725.py
TCS34725.py
 
 
coloursensorexample.py
coloursensorexample.py
 
 
coloursensorexample2.py
coloursensorexample2.py
 
 

Repository files navigation

TCS34725-Python-Module

Python 2.x Module for use with a TCS34725 colour sensor and the Raspberry Pi. I used an adafruit TCS34725 colour sensor breakout board.

To use this module, run your program as the root user, i.e. sudo...

The module needs smbus to be installed to use the i2c interface. The i2c interface also needs to be enabled on your Raspberry Pi.

Also included are 2 example files, one that when run will output raw colour sensor data every second and the 2nd which will try reflecting the colour sensed via pygame and a tri colour LED. The 2nd example will also make a best guess at the name of the colour being sensed and print it out. The 2nd example requires the RPi.GPIO module

The connections to the adafruit TCS34725 colour sensor break out board I used are as follows:

  • TCS34725 LED connect to Gnd to turn off
  • TCS34725 Int - not connected but could be connected any Pi GPIO and used
  • TCS34725 SDA - Pi SDA
  • TCS34725 SCL - Pi SCL
  • TCS34725 3.3V - not connected
  • TCS34725 Gnd - Pi Gnd
  • TCS34725 Vin - Pi 3.3V

The i2c address for the TCS34725 colour sensor is 0x29.

The data sheet for the TCS34725 Colour sensor can be downloaded from the adafruit website

Current functions include:

  • clear_interrupt()
  • read_CRGB()
  • read_status()
  • set_enables(pon=0, aen=0, wen=0, aien=0)
  • set_gain(gain=1)
  • set_wait_time(wtime, wlong=0)
  • set_a_time(atime)
  • set_interrupt_levels(lowTL = 0, highTL = 65535, persLevel = 0)

About

TCS34725 colour sensor Python module

Topics

color-sensorcolour-sensorpythonraspberrypitcs34725

Resources

Readme
GPL-3.0 license
Activity

Stars

3 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.