Product Overview

1/31/2018 AS726X NIR/VIS Spectral Sensor Hookup Guide - learn.sparkfun.com
https://learn.sparkfun.com/tutorials/as726x-nirvi?_ga=2.149930550.1022152466.1517244327-204410570.1509632255 6/8
void enableIndicator(); — Powers on the surface mounted blue indicator LED.
void disableIndicator(); — Powers off the surface mounted blue indicator LED.
void setIndicatorCurrent(byte current); — Sets the current on the indicator LED. The default
is current = 3 , or 8 mA.
0: 1 mA
1: 2 mA
2: 4 mA
3: 8 mA
void enableBulb(); — Powers on the surface mounted blue indicator LED.
void disableBulb(); — Powers off the surface mounted blue indicator LED.
void setBulbCurrent(byte current); — Sets the current limit on the indicator LED and optional bulb (They
are connected in parallel) The default is current = 0 or 12.5 mA.
0: 12.5 mA
1: 25 mA
2: 50 mA
3: 100 mA
void softReset(); — Gives the sensor a 1 second reset.
void setGain(byte gain); — Pass in a 0, 1, 2 or 3 to change the gain.
0: 1x
1: 3.7x
2: 16x
3: 64x (power-on default)
void setIntegrationTime(byte integrationValue); — This sets the time over which samples are taken.
Takes a value between 0 and 255.
Integration time will be 2.8 ms * integrationValue .
void enableInterrupt(); — Pulls the interrupt pin low. (Note: not yet implemented)
void disableInterrupt(); — Pulls the interrupt pin high.
If you’d like access to just one channel, getting uncalibrated and calibrated spectral readings for the AS7262
(Visible) sensor can be accomplished with the following commands:
int getViolet();
int getBlue();
int getGreen();
int getYellow();
int getOrange();
int getRed();
float getCalibratedViolet();
float getCalibratedBlue();
float getCalibratedGreen();
float getCalibratedYellow();
float getCalibratedOrange();
float getCalibratedRed();
A similar set of functions is available for accessing individual channels on the AS7263 (Near Infrared) sensor.
int getR();
int getS();
int getT();
int getU();
int getV();
int getW();
float getCalibratedR();
float getCalibratedS();
float getCalibratedT();
float getCalibratedU();
float getCalibratedV();
float getCalibratedW();
Software