#define MQTT_ENABLE // Make sure to configure mqtt-server and (optionally) username+pwd
#define MQTT_ENABLE // Make sure to configure mqtt-server and (optionally) username+pwd
#define FTP_ENABLE // Enables FTP-server
#define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS if enabled
//#define FTP_ENABLE // Enables FTP-server
//#define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS if enabled
#define NEOPIXEL_REVERSE_ROTATION // Some Neopixels are adressed/soldered counter-clockwise. This can be configured here.
#define NEOPIXEL_REVERSE_ROTATION // Some Neopixels are adressed/soldered counter-clockwise. This can be configured here.
#define LANGUAGE 1 // 1 = deutsch; 2 = english
#define LANGUAGE 1 // 1 = deutsch; 2 = english
//#define SINGLE_SPI_ENABLE // If only one SPI-instance should be used instead of two
#define HAL 1 // HAL 1 = LoLin32, 2 = AI AudioKit
#define MFRC522_BUS 2 // If MFRC522 should be connected to I2C-Port(2) or SPI(1)
//#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)
//#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)
//#define BLUETOOTH_ENABLE // Doesn't work currently (so don't enable) as there's not enough DRAM available
//#define BLUETOOTH_ENABLE // Doesn't work currently (so don't enable) as there's not enough DRAM available
@ -19,6 +20,9 @@
#include"BluetoothA2DPSink.h"
#include"BluetoothA2DPSink.h"
#endif
#endif
#include"Audio.h"
#include"Audio.h"
#if (HAL == 2)
#include"AC101.h"
#endif
#include"SPI.h"
#include"SPI.h"
#include"SD.h"
#include"SD.h"
#include"FS.h"
#include"FS.h"
@ -68,13 +72,12 @@ const uint8_t serialDebug = LOGLEVEL_INFO; // Current loglevel for seri
uint8_tserialLoglength=200;
uint8_tserialLoglength=200;
char*logBuf=(char*)calloc(serialLoglength,sizeof(char));// Buffer for all log-messages
char*logBuf=(char*)calloc(serialLoglength,sizeof(char));// Buffer for all log-messages
#if (HAL == 1)
// GPIOs (uSD card-reader)
// GPIOs (uSD card-reader)
#define SPISD_CS 15
#define SPISD_CS 15
#ifndef SINGLE_SPI_ENABLE
#define SPISD_MOSI 13
#define SPISD_MISO 16 // 12 doesn't work with some devel-boards
#define SPISD_SCK 14
#endif
#define SPISD_MOSI 13
#define SPISD_MISO 16 // 12 doesn't work with some devel-boards
#define SPISD_SCK 14
// GPIOs (RFID-readercurrentRfidTagId)
// GPIOs (RFID-readercurrentRfidTagId)
#define RST_PIN 22
#define RST_PIN 22
@ -88,10 +91,6 @@ char *logBuf = (char*) calloc(serialLoglength, sizeof(char)); // Buffer for all
#define I2S_BCLK 27
#define I2S_BCLK 27
#define I2S_LRC 26
#define I2S_LRC 26
#ifdef BLUETOOTH_ENABLE
BluetoothA2DPSinka2dp_sink;
#endif
// GPIO used to trigger transistor-circuit / RFID-reader
// GPIO used to trigger transistor-circuit / RFID-reader
#define POWER 17
#define POWER 17
@ -108,6 +107,75 @@ char *logBuf = (char*) calloc(serialLoglength, sizeof(char)); // Buffer for all