Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rcolistete/MicroPython_AS7262X_driver
MicroPython driver for AS7262/AS7263 nano spectrometer sensor
https://github.com/rcolistete/MicroPython_AS7262X_driver
Last synced: 3 months ago
JSON representation
MicroPython driver for AS7262/AS7263 nano spectrometer sensor
- Host: GitHub
- URL: https://github.com/rcolistete/MicroPython_AS7262X_driver
- Owner: rcolistete
- License: mit
- Created: 2018-09-20T12:07:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-20T12:20:13.000Z (about 6 years ago)
- Last Synced: 2024-04-22T13:30:44.770Z (7 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - MicroPython_AS7262X_driver - MicroPython driver for AS7262/AS7263 nano spectrometer sensor. (Libraries / Sensors)
README
# MicroPython_AS7262X_driver
MicroPython driver for AS7262/AS7263 nano spectrometer sensorThere 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) :
```python
from microbit import i2c
import as726x
sensor = as726x.AS726X(i2c)
sensor.takeOneShotSynchMeasurement()
```
##### Continuous mode :
```python
from microbit import i2c
import as726x
sensor = as726x.AS726X(i2c)
sensor.getCalibrated6Channels()
sensor.setMeasurementMode(2)
while True:
if sensor.dataAvailable():
print(sensor.getCalibrated6Channels())
```