diff options
Diffstat (limited to 'sensor/sensor.ino')
-rw-r--r-- | sensor/sensor.ino | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sensor/sensor.ino b/sensor/sensor.ino index 019ff23..5a1f075 100644 --- a/sensor/sensor.ino +++ b/sensor/sensor.ino @@ -22,7 +22,16 @@ /// @see <https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z2tFBF4gN7ziG9oXtUytVQNYe3VhQ/tree/Mussel/README.md> /// @see <https://moodle.ruc.dk/course/view.php?id=23504> -#include "mylog.h" +// include and refine ESP32 Logging system +// activate in Arduino IDE: Tools -> Core Debug Level +#define CONFIG_ARDUHAL_ESP_LOG 1 +#define LOG_LOCAL_LEVEL CORE_DEBUG_LEVEL +#include <esp32-hal-log.h> +#undef ARDUHAL_LOG_FORMAT +#define ARDUHAL_LOG_FORMAT(letter, format) \ + ARDUHAL_LOG_COLOR_##letter "[" #letter "] %s(): " format \ + ARDUHAL_LOG_RESET_COLOR "\r\n", __FUNCTION__ + #include "BLEDevice.h" #include "BLEBeacon.h" #include "BLEAdvertising.h" @@ -160,11 +169,10 @@ void setBeacon(int angle) { void setup() { - // enable logging (when also raised in IDE: Tools -> Core Debug Level) + // enable logging to serial Serial.begin(115200); esp_log_level_set("*", ESP_LOG_DEBUG); - Serial.begin(115200); beginPace(); beginTouchDetection(); |