

HUSKYLENS 2, manufactured by DFRobot (Part ID: SEN0638), is an advanced AI-enabled vision sensor designed for object, color, and face recognition. It features a user-friendly interface and supports multiple communication protocols, making it an ideal choice for robotics, automation, and AI-based projects. With its built-in machine learning algorithms, HUSKYLENS 2 simplifies complex vision tasks, enabling developers to focus on innovation rather than implementation.








Below are the key technical details of the HUSKYLENS 2:
| Specification | Details |
|---|---|
| Manufacturer | DFRobot |
| Part ID | SEN0638 |
| Power Supply Voltage | 3.3V to 5V |
| Communication Interfaces | UART, I2C |
| Image Resolution | 320 x 240 pixels |
| Frame Rate | 30 FPS |
| Recognition Capabilities | Object, face, color, tag, line, and QR code recognition |
| Display | 2.0-inch IPS screen (320 x 240 resolution) |
| Processor | Built-in AI processor for real-time recognition |
| Dimensions | 52mm x 44mm x 20mm |
| Weight | 30g |
The HUSKYLENS 2 features a 4-pin interface for communication and power. Below is the pin configuration:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | TX | UART Transmit pin (used for serial communication) |
| 4 | RX | UART Receive pin (used for serial communication) |
For I2C communication, the HUSKYLENS 2 uses the following default addresses:
Below is an example of how to connect and program the HUSKYLENS 2 with an Arduino UNO using UART communication:
#include <SoftwareSerial.h>
#include "HUSKYLENS.h"
// Define software serial pins for HUSKYLENS communication
SoftwareSerial huskySerial(2, 3); // RX, TX
HUSKYLENS huskyLens;
void setup() {
Serial.begin(9600); // Initialize serial monitor
huskySerial.begin(9600); // Initialize HUSKYLENS communication
if (!huskyLens.begin(huskySerial)) {
Serial.println("HUSKYLENS initialization failed!");
while (1); // Halt if initialization fails
}
Serial.println("HUSKYLENS initialized successfully!");
}
void loop() {
if (huskyLens.request()) { // Request data from HUSKYLENS
if (huskyLens.isLearned()) { // Check if an object is learned
Serial.println("Object detected!");
} else {
Serial.println("No object detected.");
}
} else {
Serial.println("Failed to communicate with HUSKYLENS.");
}
delay(500); // Wait for 500ms before the next request
}
HUSKYLENS 2 is not powering on:
No data received from the sensor:
Recognition accuracy is low:
I2C communication not working:
Q: Can HUSKYLENS 2 recognize multiple objects simultaneously?
A: Yes, HUSKYLENS 2 can recognize and track multiple objects, depending on the selected mode.
Q: How do I update the firmware?
A: Connect the HUSKYLENS 2 to a computer via the USB-C port and use the DFRobot firmware update tool.
Q: Is HUSKYLENS 2 compatible with Raspberry Pi?
A: Yes, HUSKYLENS 2 can be interfaced with Raspberry Pi using UART or I2C communication.
Q: Can I modify the recognition modes programmatically?
A: Yes, you can switch between recognition modes using the DFRobot HUSKYLENS library.
By following this documentation, users can effectively integrate and utilize the HUSKYLENS 2 in their projects.