Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A python package for the color sensor S11059-02DT

Project description

CsCntlr (Color-sensor Controller)

A python package for the color sensor S11059-02DT.


pip install CsCntlr

Getting Started

# First, create a CsCntlr instance
cs = CsCntlr()

# Then, select the mode to be used

# You can measure colors by using the code below

Examples for Fixed Period Mode

cs = CsCntlr()

# You can specify the gain and the integration time (tint)'low', tint=2)

# gain should be 'low' or 'high' (low:high = 1:10)'lolo')'hi')

# tint should be from 0 to 3
# 3: 179.2 ms, 2: 22.4 ms, 1: 1.4 ms, 0: 0.0875 ms'hi')

Examples for Manual Setting Mode

In this mode, the sensor goes to standby mode after the measurement.

cs = CsCntlr()

# You can specify the manual integration time (man_tint)'high', man_tint=100, tint=0)

# gain should be 'low' or 'high' (low:high = 1:10)'lolo')'hi')

# tint should be from 0 to 3
# 3: 358.4 ms, 2: 44.8 ms, 1: 2.8 ms, 0: 0.175 ms'hi')

# man_tint should be from 0 to 65535
# measurement_time = tint * man_tint * 4'high', man_tint=70000, tint=1)'hi')

Note: CsCntlr is Singleton

cs = CsCntlr()

cs1 = CsCntlr()

# now, cs is changed to the Fixed Period Mode
# Fixed Period Mode

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for CsCntlr, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size CsCntlr-0.0.5.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page