-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.ino
39 lines (33 loc) · 972 Bytes
/
utils.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Log to serial output
void log(String msg, int val){
Serial.println(msg + val);
}
void showFreeMemory(){
Serial.print("free memory: ");
Serial.println(freeMemory());
}
// Return a random servo
boolean servoPick = 0;
Servo randomServo(){
Servo servos[] = {
servo_base, servo_top };
boolean pick = servoPick;
servoPick = !servoPick;
return servos[pick];
}
void printlogHeader(){
Serial.println("_____________________________");
Serial.println("");
Serial.println(" * ");
}
void printlogFooter(){
Serial.println(" (`.-,')");
Serial.println(" .-' ;");
Serial.println(" _.-' , `,-");
Serial.println(" _ _.-' .' /._");
Serial.println(" .' ` _.-. / ,'._;)");
Serial.println(" ( . )-| (");
Serial.println(" )`,_ ,'_,' /_;)");
Serial.println("('_ _,'.' (___,))");
Serial.println(" `-:;.-'");
}