mirror of
https://github.com/DinoMalin/paranoia-1.0.git
synced 2025-10-29 19:05:59 +00:00
feat: add functions to Face class
This commit is contained in:
parent
4068f02fb2
commit
a3dfc57a73
@ -8,5 +8,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
void blink();
|
void blink();
|
||||||
void drawEyes();
|
void drawEyes();
|
||||||
|
void drawLeftSideEye();
|
||||||
|
void drawRightSideEye();
|
||||||
|
void defaultPos();
|
||||||
Face(LCD lcd);
|
Face(LCD lcd);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -23,3 +23,18 @@ void Face::drawEyes() {
|
|||||||
lcd.drawRectangle(x+7, 1);
|
lcd.drawRectangle(x+7, 1);
|
||||||
lcd.drawRectangle(x+8, 1);
|
lcd.drawRectangle(x+8, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Face::drawLeftSideEye() {
|
||||||
|
this->x = 1;
|
||||||
|
drawEyes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Face::drawRightSideEye() {
|
||||||
|
this->x = 6;
|
||||||
|
drawEyes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Face::defaultPos() {
|
||||||
|
this->x = 3;
|
||||||
|
drawEyes();
|
||||||
|
}
|
||||||
|
|||||||
@ -36,12 +36,19 @@ void loop() {
|
|||||||
face.drawEyes();
|
face.drawEyes();
|
||||||
delay(1200);
|
delay(1200);
|
||||||
|
|
||||||
|
face.drawLeftSideEye();
|
||||||
|
delay(500);
|
||||||
|
|
||||||
|
face.drawRightSideEye();
|
||||||
|
delay(500);
|
||||||
|
|
||||||
|
face.defaultPos();
|
||||||
|
face.drawEyes();
|
||||||
|
delay(800);
|
||||||
|
|
||||||
face.blink();
|
face.blink();
|
||||||
delay(300);
|
delay(300);
|
||||||
|
|
||||||
face.drawEyes();
|
|
||||||
delay(1200);
|
|
||||||
|
|
||||||
Serial.print("[CMD]");
|
Serial.print("[CMD]");
|
||||||
Serial.println("[firefox --new-window 'https://www.terre-plate.org/terre-plate-preuve-ultime/']");
|
Serial.println("[firefox --new-window 'https://www.terre-plate.org/terre-plate-preuve-ultime/']");
|
||||||
Serial.print("[CMD]");
|
Serial.print("[CMD]");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user