Skip to content

Commit 63507cf

Browse files
committed
Add the ability to switch algorithms in the example program
1 parent 3f8abdf commit 63507cf

File tree

13 files changed

+29
-4
lines changed

13 files changed

+29
-4
lines changed

examples/Draw/Draw.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ void setup() {
3838
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
3939
delay(100);
4040
}
41+
huskylens.switchAlgorithm(ALGORITHM_FACE_RECOGNITION);
42+
delay(5000);
4143
}
4244

4345
void loop() {

examples/EyeGaze/EyeGaze.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ void setup() {
4141
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
4242
delay(100);
4343
}
44+
huskylens.switchAlgorithm(ALGORITHM_GAZE_RECOGNITION);
45+
delay(5000);
4446
}
4547

4648
void loop() {
@@ -61,7 +63,8 @@ void loop() {
6163
Serial.println(result->yaw);
6264

6365
// Azimuth: the horizontal projection angle.
64-
// 0 degrees points to the right side of the screen, increasing counterclockwise.
66+
// 0 degrees points to the right side of the screen, increasing
67+
// counterclockwise.
6568
Serial.print("result->azimuth=");
6669
Serial.println(result->azimuth);
6770
// The spatial unit length is 432. 'length' is the projected length.

examples/FaceOrientation/FaceOrientation.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ void setup() {
3737
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
3838
delay(100);
3939
}
40+
huskylens.switchAlgorithm(ALGORITHM_FACE_ORIENTATION);
41+
delay(5000);
4042
}
4143

4244
void loop() {

examples/FaceRecognition/FaceRecognition.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ void setup() {
4747
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
4848
delay(100);
4949
}
50+
huskylens.switchAlgorithm(ALGORITHM_FACE_RECOGNITION);
51+
delay(5000);
5052
}
5153

5254
void loop() {

examples/GetStart_I2C/GetStart_I2C.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ void setup() {
3939
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
4040
delay(100);
4141
}
42+
huskylens.switchAlgorithm(ALGORITHM_FACE_RECOGNITION);
43+
delay(5000);
4244
}
4345

4446
void loop() {

examples/GetStart_UART/GetStart_UART.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ void setup() {
5959
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
6060
delay(100);
6161
}
62+
huskylens.switchAlgorithm(ALGORITHM_FACE_RECOGNITION);
63+
delay(5000);
6264
}
6365

6466
void loop() {

examples/HandRecognition/HandRecognition.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ void setup() {
4747
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
4848
delay(100);
4949
}
50+
huskylens.switchAlgorithm(ALGORITHM_HAND_RECOGNITION);
51+
delay(5000);
5052
}
5153

5254
void loop() {

examples/Knowledges/Knowledges.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ void setup() {
3535
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
3636
delay(100);
3737
}
38+
huskylens.switchAlgorithm(ALGORITHM_OBJECT_RECOGNITION);
39+
delay(5000);
3840
}
3941

4042
void loop() {
4143
huskylens.saveKnowledges(ALGORITHM_OBJECT_RECOGNITION, 1);
42-
delay(2000);
44+
delay(5000);
4345
huskylens.loadKnowledges(ALGORITHM_OBJECT_RECOGNITION, 1);
44-
delay(2000);
46+
delay(5000);
4547
}

examples/LearnForget/LearnForget.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ void setup() {
3737
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
3838
delay(100);
3939
}
40+
huskylens.switchAlgorithm(ALGORITHM_FACE_RECOGNITION);
41+
delay(5000);
4042
}
4143

4244
void loop() {

examples/LineTrack/LineTrack.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ void setup() {
3939
Serial.println(F("\tgreen line >> SDA/TX; blue line >> SCL/RX"));
4040
delay(100);
4141
}
42+
huskylens.switchAlgorithm(ALGORITHM_LINE_TRACKING);
43+
delay(5000);
4244
}
4345

4446
void loop() {

0 commit comments

Comments
 (0)