Metadata-Version: 1.1
Name: CsCntlr
Version: 0.0.5
Summary: A python package for the color sensor S11059-02DT
Home-page: https://github.com/NariseT/CsCntlr
Author: Takafumi Narise
Author-email: narise.pub@gmail.com
License: MIT
Description: CsCntlr (Color-sensor Controller)
        =================================
        
        A python package for the color sensor S11059-02DT.
        
        Installation
        ============
        
        ::
        
            pip install CsCntlr
        
        Getting Started
        ===============
        
        ::
        
            # First, create a CsCntlr instance
            cs = CsCntlr()
        
            # Then, select the mode to be used
            cs.useFixedPeriodMode()
            cs.useManualSettingMode()
        
            # You can measure colors by using the code below
            cs.cntlr.auto()
        
        Examples for Fixed Period Mode
        ==============================
        
        ::
        
            cs = CsCntlr()
            cs.useFixedPeriodMode()
        
            # You can specify the gain and the integration time (tint)
            cs.cntlr.auto(gain='low', tint=2)
        
            # gain should be 'low' or 'high' (low:high = 1:10)
            cs.cntlr.auto(gain='lolo')
            cs.cntlr.auto(gain='hi')
        
            # tint should be from 0 to 3 
            # 3: 179.2 ms, 2: 22.4 ms, 1: 1.4 ms, 0: 0.0875 ms
            cs.cntlr.auto(tint=100)
            cs.cntlr.auto(tint='hi')
        
        Examples for Manual Setting Mode
        ================================
        
        In this mode, the sensor goes to standby mode after the measurement.
        
        ::
        
            cs = CsCntlr()
            cs.useManualSettingMode()
        
            # You can specify the manual integration time (man_tint)
            cs.cntlr.auto(gain='high', man_tint=100, tint=0)
            cs.cntlr.auto(man_tint=1)
        
            # gain should be 'low' or 'high' (low:high = 1:10)
            cs.cntlr.auto(gain='lolo')
            cs.cntlr.auto(gain='hi')
        
            # tint should be from 0 to 3
            # 3: 358.4 ms, 2: 44.8 ms, 1: 2.8 ms, 0: 0.175 ms
            cs.cntlr.auto(tint=100)
            cs.cntlr.auto(tint='hi')
        
            # man_tint should be from 0 to 65535
            # measurement_time = tint * man_tint * 4
            cs.cntlr.auto(gain='high', man_tint=70000, tint=1)
            cs.cntlr.auto(man_tint='hi')
        
        Note: CsCntlr is Singleton
        ==========================
        
        ::
        
            cs = CsCntlr()
            cs.useManualSettingMode()
        
            cs1 = CsCntlr()
            cs1.useFixedPeriodMode()
        
            # now, cs is changed to the Fixed Period Mode
            print(cs.cntlr_mode)
            # Fixed Period Mode
        
Keywords: Color-sensor S11059-02DT Raspberry-Pi
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Operating System :: Other OS
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
