7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
39/66
Project 3 - Fingerprint unlocks treasure box -
SeeeduinoXIAO
Overview
49
//turn right 2155821255
50
motor0.drive(
600
);
51
motor1.drive(
600
);
52
delayUntil(
20
);
53
}
54
if
(results.value ==
2155837575
) {
55
//turn left 2155837575
56
motor0.drive(
-600
);
57
motor1.drive(
-600
);
58
delayUntil(
20
);
59
}
60
irrecv.resume();
//recive next int
61
62
}
63
delay(
100
);
64
}
65
66
void
delayUntil
(
unsigned long
elapsedTime) {
67
unsigned long
startTime = millis();
68
while
(sta elapsedTime > millis()) {
69
if
(digitalRead(FAULTn) == LOW) {
70
byte result = motor0.getFault();
71
result = motor1.getFault();
72
}
73
}
74
}