Skip to main content

Proximity, gesture, light and colour sensor

Project description

GitHub Issues GitHub Commit Maintained Build status badge MIT licensed

Python-SL06

The SL06 xChip features advanced Gesture detection, Proximity detection, Digital Ambient Light Sense (ALS) and Colour Sense (RGBC). It is based on the popular APDS9960 manufactured by Avago Technologies.

Usage

Mu-editor

Download Mu-editor

CW01 and CW02

  • Use XinaBoxUploader and flash MicroPython to the CW01/CW02.
  • Download Python packages from the REPL with the following code:
    import network
    import upip
    sta_if = network.WLAN(network.STA_IF)
    sta_if.active(True)
    sta_if.connect("ssid", "password")
    upip.install("xinabox-SL06")
    

CC03, CS11 and CW03

  • Download the .UF2 file for CC03/CS11/CW03 CircuitPython and flash it to the board.
  • TO DO

MicroBit

  • TO DO

Raspberry Pi

Requires Python 3

pip3 install xinabox-SL06

Example

from xCore import xCore
from xSL06 import xSL06

# SL06 instance
SL06 = xSL06()

# configure SL06
SL06.init()

# enable SL06 for gesture sensing
SL06.enableGestureSensor()

while True:
    if SL06.isGestureAvailable():   # check for gesture
        dir = SL06.getGesture()     # read direction
        print(dir)                  # print direction on console

    xCore.sleep(100)

Project details


Download files

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

Source Distribution

xinabox-SL06-0.0.9.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file xinabox-SL06-0.0.9.tar.gz.

File metadata

  • Download URL: xinabox-SL06-0.0.9.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for xinabox-SL06-0.0.9.tar.gz
Algorithm Hash digest
SHA256 0e28fc1b791f5ed697106bf97b34dc0cd374a9ee04b18713e536b77514b8b6ae
MD5 0b3ae720bb747c1a145585f0eaeb417f
BLAKE2b-256 bdbb5e3559f9ed321a6f97927dfc5c2d192a56c7ed24710622db332ef4fb9ed1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page