Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino-Makefile Support #84

Open
wants to merge 2 commits into
base: DEV
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# How-To:
# Arduino-Makefile auschecken
# git clone [email protected]: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
12 changes: 12 additions & 0 deletions Tonuino.ino
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ void loadSettingsFromFlash() {
Serial.println(mySettings.adminMenuPin[3]);
}



class Modifier {
public:
virtual void loop() {}
Expand Down Expand Up @@ -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;
Expand Down