The AS7263 is a 6-channel near-infrared spectral sensor manufactured by SparkFun, with the part ID NIR. This sensor provides digital measurements of light intensity for wavelengths between 610nm and 860nm. It is commonly used in applications such as material and liquid analysis, color matching, and spectral identification.
Parameter | Value |
---|---|
Supply Voltage | 3.3V |
Operating Current | 100mA (typical) |
Spectral Channels | 6 |
Wavelength Range | 610nm to 860nm |
Communication | I2C |
I2C Address | 0x49 |
Operating Temperature | -40°C to +85°C |
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | VCC | Supply Voltage (3.3V) |
3 | SDA | I2C Data Line |
4 | SCL | I2C Clock Line |
5 | INT | Interrupt Output (Active Low) |
6 | RST | Reset (Active Low) |
#include <Wire.h>
#include "SparkFun_AS726X.h"
AS726X sensor;
void setup() {
Serial.begin(9600);
Wire.begin();
if (sensor.begin() == false) {
Serial.println("AS7263 not detected. Check wiring.");
while (1);
}
sensor.setMeasurementMode(2); // Set to 2 for continuous mode
sensor.enableIndicator(); // Enable the indicator LED
}
void loop() {
sensor.takeMeasurements();
Serial.print("610nm: ");
Serial.println(sensor.getCalibratedA());
Serial.print("680nm: ");
Serial.println(sensor.getCalibratedB());
Serial.print("730nm: ");
Serial.println(sensor.getCalibratedC());
Serial.print("760nm: ");
Serial.println(sensor.getCalibratedD());
Serial.print("810nm: ");
Serial.println(sensor.getCalibratedE());
Serial.print("860nm: ");
Serial.println(sensor.getCalibratedF());
delay(1000); // Wait for 1 second before taking new measurements
}
By following this documentation, users should be able to effectively integrate and utilize the AS7263 near-infrared spectral sensor in their projects.