Files

31 lines
1.6 KiB
C++

#pragma once
#include <MD_MAX72xx.h>
// ---- Verdrahtung MAX7219-Matrix (32x8, 4 Module a 8x8), Hardware-SPI ----
constexpr MD_MAX72XX::moduleType_t MATRIX_HARDWARE_TYPE = MD_MAX72XX::FC16_HW; // ggf. anpassen falls Anzeige verdreht/gespiegelt ist
constexpr uint8_t MATRIX_CS_PIN = 10; // DIN=D11(MOSI), CLK=D13(SCK) sind fest durch Hardware-SPI vorgegeben
constexpr uint8_t MATRIX_MAX_DEVICES = 4;
constexpr uint8_t DISPLAY_WIDTH = MATRIX_MAX_DEVICES * 8;
constexpr uint8_t DISPLAY_HEIGHT = 8;
constexpr uint8_t ERROR_COLUMNS = 8;
constexpr uint8_t TIME_START_COLUMN = 12;
constexpr uint8_t STATUS_START_COLUMN = 30;
// ---- Kontakte / Taster (alle INPUT_PULLUP, aktiv = LOW) ----
constexpr uint8_t WIRE_PIN = 2; // Kontakt des heißen Drahts
constexpr uint8_t BUZZER_PIN = 3; // passiver Buzzer, Ansteuerung per tone()
constexpr uint8_t RESET_PIN = 4; // Reset-Button, wirkt erst beim Loslassen
constexpr uint8_t START_PIN = 5; // Startkontakt
constexpr uint8_t END_PIN = 6; // Endkontakt
// ---- Spielparameter ----
constexpr uint8_t PENALTY_SECONDS_PER_ERROR = 5; // Strafzeit je Fehlerkontakt
constexpr unsigned long WIRE_RELEASE_MILLISECONDS = 300; // Draht muss so lange frei sein, bevor ein neuer Fehler zählt
constexpr unsigned int BUZZER_TONE_HZ = 1000;
constexpr unsigned int BUZZER_TONE_MS = 150; // tone() mit duration ist nicht-blockierend
// ---- Betriebsanzeige / Startup-Test ----
constexpr const char *STARTUP_TEST_TEXT = "Heisser HOBBYHIMMEL"; // \xdf = 'ß' im MD_MAX72XX-Zeichensatz (CP437)
constexpr unsigned int STARTUP_SCROLL_SPEED_MS = 30;
constexpr unsigned int HEARTBEAT_BLINK_MS = 500; // Blinkintervall der Betriebsanzeige oben rechts