Skip to content

MicroPython driver for AS7262/AS7263 nano spectrometer sensor

License

Notifications You must be signed in to change notification settings

rcolistete/MicroPython_AS7262X_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython_AS7262X_driver

MicroPython driver for AS7262/AS7263 nano spectrometer sensor

There are specific versions for :

  • Pyboard and BBC Micro:bit;
  • low memory usage, using less RAM memory.

Examples using Micro:bit lowmem version, rename the driver to 'as726x.py' and copy it to flash memory.

One shot mode (only one measure for each command) :
from microbit import i2c
import as726x
sensor = as726x.AS726X(i2c)
sensor.takeOneShotSynchMeasurement()
Continuous mode :
from microbit import i2c
import as726x
sensor = as726x.AS726X(i2c)
sensor.getCalibrated6Channels()
sensor.setMeasurementMode(2)
while True:                               
    if sensor.dataAvailable():            
        print(sensor.getCalibrated6Channels())

About

MicroPython driver for AS7262/AS7263 nano spectrometer sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages