Skip to content

Pure MicroPython driver for the AS7341 10-channel color sensor. Ported from Adafruit's CircuitPython driver.

Notifications You must be signed in to change notification settings

AHSPC/AS7341_micropython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AS7341_mycropython

Tested with an RPI Pico.

Depends on Adafruit's register and i2c_device libraries. See our micropython port of i2c_device here. Adafruit's CircuitPython register (here) seems to work unchanged.

as7341.py needs the files i2c_bit.py, i2c_bits.py, and i2c_struct.py from register, and i2c_device.py from i2c_device.

See Adafruit's AS7341 circuitpython library repository for other usage examples (they will need to be ported). A simple example is shown in ./test.py.

An additional get_readings() method is provided to abstract away from the individual channels and wavelengths. It additionally ignores all OSErrors via try-catch and calls itself recursively if one is encountered (specific to AHS's Electronics Workshop class).

About

Pure MicroPython driver for the AS7341 10-channel color sensor. Ported from Adafruit's CircuitPython driver.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages