Memes: splash screen
parent
e2ea10152d
commit
534d11741c
|
@ -2,14 +2,6 @@
|
|||
#include "constants.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
void helloBuzz() {
|
||||
tone(BUZZER_PIN, 500, 100);
|
||||
delay(100);
|
||||
tone(BUZZER_PIN, 1000, 100);
|
||||
delay(100);
|
||||
tone(BUZZER_PIN, 4000, 100);
|
||||
}
|
||||
|
||||
void happyBuzz() {
|
||||
tone(BUZZER_PIN, 1500, 50);
|
||||
delay(75);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
void helloBuzz();
|
||||
void happyBuzz();
|
||||
void sadBuzz();
|
||||
void beep();
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "debug.h"
|
||||
#include "timer.h"
|
||||
#include "stepper.h"
|
||||
#include "memes.h"
|
||||
|
||||
void setup() {
|
||||
setupDebug();
|
||||
|
@ -22,14 +23,14 @@ void setup() {
|
|||
fatal();
|
||||
}
|
||||
|
||||
helloBuzz();
|
||||
splashScreen();
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// debugScanI2C();
|
||||
debugScanI2C();
|
||||
// demoScreen();
|
||||
// demoStepper();
|
||||
|
||||
demoTimer();
|
||||
|
||||
auto key = handleKeyboard();
|
||||
|
@ -55,8 +56,6 @@ void loop() {
|
|||
beep();
|
||||
} else if (key == KEY_D) {
|
||||
tick();
|
||||
} else {
|
||||
tick();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#include <Arduino.h>
|
||||
|
||||
#include "screen.h"
|
||||
#include "buzzer.h"
|
||||
#include "constants.h"
|
||||
|
||||
void splashScreen() {
|
||||
// lcd is slow, so we have to issue commands sufficiently early
|
||||
// to synchronize with the hello buzz
|
||||
lcd.clear();
|
||||
lcd.print(" cewk");
|
||||
delay(100);
|
||||
tone(BUZZER_PIN, 500, 180);
|
||||
delay(20);
|
||||
lcd.print("-o-");
|
||||
delay(100);
|
||||
tone(BUZZER_PIN, 1000, 180);
|
||||
delay(20);
|
||||
lcd.print("mator");
|
||||
delay(100);
|
||||
tone(BUZZER_PIN, 4000, 180);
|
||||
delay(500);
|
||||
lcd.setCursor(0, 1);
|
||||
lcd.print(" HSWAW 2024 ");
|
||||
delay(300);
|
||||
lcd.setCursor(0, 1);
|
||||
lcd.print("by");
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
void splashScreen();
|
|
@ -17,8 +17,3 @@ bool setupScreen() {
|
|||
lcd.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
void demoScreen() {
|
||||
lcd.print(" cewk-o-mator ");
|
||||
lcd.print(" HSWAW 2024 ");
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <LCD_I2C.h>
|
||||
|
||||
extern LCD_I2C lcd;
|
||||
|
||||
bool setupScreen();
|
||||
void demoScreen();
|
||||
|
|
Loading…
Reference in New Issue