Memes: splash screen

main
radex 2024-02-14 17:43:21 +01:00
parent e2ea10152d
commit 534d11741c
Signed by: radex
SSH Key Fingerprint: SHA256:hvqRXAGG1h89yqnS+cyFTLKQbzjWD4uXIqw7Y+0ws30
7 changed files with 36 additions and 20 deletions

View File

@ -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);

View File

@ -1,6 +1,5 @@
#pragma once
void helloBuzz();
void happyBuzz();
void sadBuzz();
void beep();

View File

@ -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();
}
}

28
firmware/src/memes.cpp Normal file
View File

@ -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");
}

1
firmware/src/memes.h Normal file
View File

@ -0,0 +1 @@
void splashScreen();

View File

@ -17,8 +17,3 @@ bool setupScreen() {
lcd.clear();
return true;
}
void demoScreen() {
lcd.print(" cewk-o-mator ");
lcd.print(" HSWAW 2024 ");
}

View File

@ -1,6 +1,8 @@
#pragma once
#include <Arduino.h>
#include <LCD_I2C.h>
extern LCD_I2C lcd;
bool setupScreen();
void demoScreen();