// #define HAL 2 // HAL 1 = LoLin32, 2 = AI AudioKit - no need to define when using platformIO
// #define HAL 2 // HAL 1 = LoLin32, 2 = AI AudioKit - no need to define when using platformIO
#define MFRC522_BUS 2 // If MFRC522 should be connected to I2C-Port(2) or SPI(1)
#define MFRC522_BUS 2 // If MFRC522 should be connected to I2C-Port(2) or SPI(1)
//#define DISPLAY_I2C // If external Display via I2C connected - tested with SH1106_128X64_NONAME
//#define DISPLAY_I2C // If external Display via I2C connected - tested with SH1106_128X64_NONAME
// #define HEADPHONE_ADJUST_ENABLE // Used to adjust (lower) volume for optional headphone-pcb (refer maxVolumeSpeaker / maxVolumeHeadphone)
//#define SINGLE_SPI_ENABLE // If only one SPI-instance should be used instead of two (not yet working!)
//#define SHUTDOWN_IF_SD_BOOT_FAILS // Will put ESP to deepsleep if boot fails due to SD. Really recommend this if there's in battery-mode no other way to restart ESP! Interval adjustable via deepsleepTimeAfterBootFails.
#define HEADPHONE_ADJUST_ENABLE // Used to adjust (lower) volume for optional headphone-pcb (refer maxVolumeSpeaker / maxVolumeHeadphone)
//#define SINGLE_SPI_ENABLE // If only one SPI-instance should be used instead of two (not yet working!)
//#define SHUTDOWN_IF_SD_BOOT_FAILS // Will put ESP to deepsleep if boot fails due to SD. Really recommend this if there's in battery-mode no other way to restart ESP! Interval adjustable via deepsleepTimeAfterBootFails.
//#define MEASURE_BATTERY_VOLTAGE // Enables battery-measurement via GPIO (ADC) and voltage-divider
//#define MEASURE_BATTERY_VOLTAGE // Enables battery-measurement via GPIO (ADC) and voltage-divider
//#define SD_NOT_MANDATORY_ENABLE // Only for debugging-purposes: Tonuino will also start without mounted SD-card anyway (will only try once to mount it). Will overwrite SHUTDOWN_IF_SD_BOOT_FAILS!
//#define SD_NOT_MANDATORY_ENABLE // Only for debugging-purposes: Tonuino will also start without mounted SD-card anyway (will only try once to mount it). Will overwrite SHUTDOWN_IF_SD_BOOT_FAILS!
@ -25,9 +25,6 @@
#include"BluetoothA2DPSink.h"
#include"BluetoothA2DPSink.h"
#endif
#endif
#include"Audio.h"
#include"Audio.h"
#if (HAL == 2)
#include"AC101.h"
#endif
#ifdef DISPLAY_I2C
#ifdef DISPLAY_I2C
#include<U8g2lib.h>
#include<U8g2lib.h>
#endif
#endif
@ -133,6 +130,9 @@ char *logBuf = (char*) calloc(serialLoglength, sizeof(char)); // Buffer for all
#endif
#endif
#endif
#endif
// HeadPhoneDetect
#define HP_DETECT 22 // Detects if there's a plug in the headphone jack or not
// END HAL 1
// END HAL 1
#elif (HAL == 2)
#elif (HAL == 2)
@ -145,36 +145,43 @@ char *logBuf = (char*) calloc(serialLoglength, sizeof(char)); // Buffer for all
// GPIO used to trigger transistor-circuit / RFID-reader
// GPIO used to trigger transistor-circuit / RFID-reader