diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..8e116ba4 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +# How-To: +# Arduino-Makefile auschecken +# git clone git@github.com:sudar/Arduino-Makefile.git@github +# +# Makefile erstellen, folgende Variablen setzen +# ARDUINO_DIR – Arduino-IDE Ordner +# ARDMK_DIR – Order in dem Arduino-Makefile ausgecheckt wurde +# entweder direkt im Makefile oder alse Umgebungsvariable (mittles export z.B.) +# +# bauen und hochladen: +# make upload +# +# Debuggen: +# make monitor +# +# Beispiel: + +ARDUINO_DIR = ${HOME}/devel/ext/arduino-1.8.12 + +BASTEL_DIR = ${HOME}/devel/basteln +PROJECT_DIR = $(BASTEL_DIR)/TonUINO +ARDUINO_SKETCHBOOK = $(BASTEL_DIR) +ARDMK_DIR = $(BASTEL_DIR)/Arduino-Makefile + +USER_LIB_PATH = $(PROJECT_DIR)/lib + +BOARD_TAG = nano +BOARD_SUB = atmega328old + +MONITOR_PORT = /dev/ttyUSB0 + +OBJDIR = $(PROJECT_DIR)/build +TARGET = TonUINO + +ARDUINO_LIBS = DFPlayer JC_Button MFRC522 EEPROM SPI SoftwareSerial + +include $(ARDMK_DIR)/Arduino.mk diff --git a/Tonuino.ino b/Tonuino.ino index c3ce9c9b..628acf49 100644 --- a/Tonuino.ino +++ b/Tonuino.ino @@ -223,6 +223,8 @@ void loadSettingsFromFlash() { Serial.println(mySettings.adminMenuPin[3]); } + + class Modifier { public: virtual void loop() {} @@ -260,6 +262,16 @@ class Modifier { Modifier *activeModifier = NULL; +// Methoden deklarieren damit der Compiler nicht jammern muss... +void setstandbyTimer(); +void playFolder(); +bool setupFolder(folderSettings * theFolder); +void playShortCut(uint8_t shortCut); +void setupCard(); +void resetCard(); +bool askCode(uint8_t *code); +bool readCard(nfcTagObject * nfcTag); + class SleepTimer: public Modifier { private: unsigned long sleepAtMillis = 0;