Skip to content

Commit

Permalink
created config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnymalina committed Mar 31, 2024
1 parent c314ec8 commit 7ec67ef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
14 changes: 14 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include <Arduino.h>

#if DEBUG == 1
#define debug(x) Serial.print(x)
#define debugln(x) Serial.println(x)
#define debugBegin(x) Serial.begin(x)
#else
#define debug(x)
#define debugln(x)
#define debugBegin(x)
#endif

16 changes: 3 additions & 13 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#define DEBUG 1

#if DEBUG == 1
#define debug(x) Serial.print(x)
#define debugln(x) Serial.println(x)
#define debugBegin(x) Serial.begin(x)
#else
#define debug(x)
#define debugln(x)
#define debugBegin(x)
#endif

#include <Arduino.h>
#include <config.h>

#define DEBUG 1 // INFO Set if the Serial output will be avalaible (1) or not (0)

bool msgToSend = 0;

Expand Down

0 comments on commit 7ec67ef

Please sign in to comment.