Buttons funktionieren nicht

Hallo!

leider konnte ich in der FAQ und über die Suche zwar Hilfe finden aber mein Problem nicht beheben. Bitte um Hilfe, da ich langsam am verzweifeln bin.

Ich nutze die Tonuino Classic Platine. Aufgespielt mittels der Arduino Software. Ich habs dann mal über den online Upload versucht. Hier kommt bei mir aber der Fehler “Error: Sending 3020: receiveData timeout after 400ms”

Wenn ich starte kommt der “Kontroll-Beep”, wenn ich eine Karte anlege kommt; “…neue Karte, …drücke die Pausetaste um fortzufahren”. Es geht aber nicht weiter, bzw. die Buttons scheinen nichts zu bewirken.

LEDs am NANO: POW ist an L flackert.

Ich habe bereits versucht die Lötstellen nochmal nachzuarbeiten und die Platinte mit Isopropanol sauber gemacht. Verhalten vorher/nachher genau gleich. Selbst wenn ich versuche die Kontakte direkt beim Nano zu brücken (Drahtbrücke von z.B. A0 auf GND) passiert nichts. Ich vermute, dass ich irgendwas an der Software falsch gemacht habe?

Serieller Monitor:

Fe|~}~~vbl~
 _____         _____ _____ _____ _____ 
|_   _|___ ___|  |  |     |   | |     |
  | | | . |   |  |  |-   -| | | |  |  |
  |_| |___|_|_|_____|_____|_|___|_____|
TonUINO Version 3.x - refactored by Boerge1

created by Thorsten Voß and licensed under GNU/GPL.
Information and contribution at https://tonuino.de.


C 3
Ver:2
Vol:25 5 15 25 5 15
EQ:1
ST:0
IB:1
AL:0
AP:1111
PCR:0
MFRC522:130
Volume: 15
track_count: 647
enter Idle
btn/cmd: start/start
enqueue mp3 262 0
play mp3 262
isPlaying: 1
isPlaying: 0
Track end: 527
Track end: 527
Card Ins
CardData: 00 00 00 00 00 00 00 00 00 
enqueue mp3 300 0
enter AdmNCard
play mp3 300
isPlaying: 1
isPlaying: 0
Track end: 528
enter ChMode
enqueue mp3 310 0
play mp3 310
isPlaying: 1
isPlaying: 0
Track end: 530
Card Rem

constants.hpp:

#ifndef SRC_CONSTANTS_HPP_
#define SRC_CONSTANTS_HPP_

#include <Arduino.h>

// ######################################################################
// ####### default pins #################################################
// ######################################################################

/* #### Classic/Every/Esp32-Nano ###########################################################
 *                         | A0| A1| A2| A3| A4| A5| A6| A7| D0| D1| D2| D3| D5| D6| D7| D8|
 * ------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 * Com to DF Player        |   |   |   |   |   |   |   |   |RX*|TX*| RX| TX|   |   |   |   |
 * 3 Button                | P | U | D |   |   |   |   |   |   |   |   |   |   |   |   |   |
 * 5 Button                | P | V+| V-| U | D |   |   |   |   |   |   |   |   |   |   |   |
 * 3x3 Button Board        | P | U | D | A |   |   |   |   |   |   |   |   |   |   |   |   |
 * Open pin for random     |   |   |   |   |   |   |   | x |   |   |   |   |   |   |   |   |
 * Rotary encoder          |   |   |   |CLK| DT|   |   |   |   |   |   |   |   |   |   |   |
 * Poti                    |   |   |   | x |   |   |   |   |   |   |   |   |   |   |   |   |
 * Neo Ring/LED animat.    |   |   |   |   |   |   |   |   |   |   |(x)|   | x |   |   |   |
 * Speaker off             |   |   |   |   |   |   |   |   |   |   |   |   |   | x |   |   |
 * Shutdown                |   |   |   |   |   |   |   |   |   |   |   |   |   |   | x |   |
 * headphone jack detection|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | x |
 * special start shortcut  |   |   |   |   |   |   | x |   |   |   |   |   |   |   |   |   |
 * bat voltage measurement |   |   |   |   |   | x |   |   |   |   |   |   |   |   |   |   |
 * Bluetooth ON/OFF        |   |   |   |   |   |   |   |   |   |   | x*|   |   | x |   |   |
 * Bluetooth Pairing       |   |   |   |   |   |   |   |   |   |   |   | x*|   |   |   | x |
 * Button LED Pins         |   |   |   |   |   | P |   |   |   |   |   |   | D | U |   |   |
 * #########################################################################################
 *
 * (*) Hardware Serial on Every/Esp32-Nano
 */

/* ### AiOplus #########################################################################################
 *                         | A0| A1| A2| A3| A4| A5| A6| A7|D10|D14|D19|D21|D27|D31|D32|D33|D36|D37|A14|
 *                         |   |   |   |   |   |   |   |   |PB2|PC0|PC5|PC7|PD5|PE1|PE2|PE3|PF2|PF3|PF4|
 * ------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 * 3 Button                | P | D | U |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
 * 5 Button                | P | D | U | V-| V+|   |   |   |   |   |   |   |   |   |   |   |   |   |   |
 * 3x3 Button Board        | P |   | A | D | U |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
 * Open pin for random     |   |   |   |   |   |   |   | x |   |   |   |   |   |   |   |   |   |   |   |
 * Rotary encoder          |   |   |   |   |   |   |   |   |   |   |   |   |   |CLK| DT|   |CLK| DT|   |
 * Poti                    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | x |
 * Neo Ring/LED animat.    |   |   |   |   |   |   |   |   | x |(x)|   |   |   |   |   |   |   |   |   |
 * Speaker off             |   |   |   |   |   |   |   |   |   |   | x |   |   |   |   |   |   |   |   |
 * Shutdown                |   |   |   |   |   |   |   |   |   |   |   |   | x |   |   |   |   |   |   |
 * headphone jack detection|   |   |   |   |   |   |   |   |   |   |   | x |   |   |   |   |   |   |   |
 * special start shortcut  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | x |   |   |   |
 * bat voltage measurement |   |   |   |   |   |   | x |   |   |   |   |   |   |   |   |   |   |   |   |
 * #####################################################################################################
 */

/* ### AiO #################################################################
 *                         | A0| A1| A2| A3| A4| A5| A6| A7| D5| D6| D7| D8|
 * ------------------------+---+---+---+---+---+---+---+---+---+---+---+---+
 * 3 Button                | P | D | U |   |   |   |   |   |   |   |   |   |
 * 5 Button                | P | D | U | V-| V+|   |   |   |   |   |   |   |
 * 3x3 Button Board        | P |   | A | D | U |   |   |   |   |   |   |   |
 * Open pin for random     |   |   |   |   |   |   |   | x |   |   |   |   |
 * Rotary encoder          |   |   |   |CLK| DT|   |   |   |   |   |   |   |
 * Poti                    |   |   |   | x |   |   |   |   |   |   |   |   |
 * Neo Ring/LED animat.    |   |   |   |   |   |   |   |   | x |   |   |   |
 * Speaker off             |   |   |   |   |   |   |   |   |   |   |   | x |
 * Shutdown                |   |   |   |   |   |   |   |   |   |   | x |   |
 * special start shortcut  |   |   |   |   |   |   | x |   |   |   |   |   |
 * #########################################################################
 */

// ######################################################################
// ####### variant and feature configuration ############################
// ######################################################################

/* Select the right PCB by uncommenting one of the following lines
 * Bitte die passende Platine durch entfernen der Kommentare in einer der folgenden Zeilen auswählen
 */
#define TonUINO_Classic
//#define TonUINO_Every
//#define TonUINO_Every_4808
//#define ALLinONE
//#define ALLinONE_Plus
//#define TonUINO_Esp32 100 // Esp32 Nano

#include "gpioHelper.hpp"

// ######################################################################

/* uncomment one of the below lines to enable special button support
 * um die Tasten zu konfigurieren, bitte eine der nächsten Zeilen auskommentieren
 * default: THREEBUTTONS for classic/every
 *          FIVEBUTTONS  for AiO and AiO+
 */
#define THREEBUTTONS
//#define FIVEBUTTONS
//#define BUTTONS3X3

// ######################################################################

/* If using Nano Every with connected DfPlayer Rx/Tx to D0/D1 uncomment the following lines
 * Wenn der Nano Every verwendet wird und Rx/Tx vom DfPlayer mit D0/D1 verbunden ist, den Kommentare der folgenden Zeile entfernen
 */
//#define DFPlayerUsesHardwareSerial

// ######################################################################

/* uncomment the below line to enable serial input as additional command source
 * um den Serial Monitor als zusätzliche Kommandoquelle zu haben bitte in der nächste Zeile den Kommentar entfernen
 * -7:             -8: up         -9: upLong
 * -4: allLong     -5: pause      -6: pauseLong
 * -1: up/downLong -2: down       -3: downLong
 * number n > 0: Springe im Voice Menü zum n-ten Eintrag und selektiere ihn
 */
#define SerialInputAsCommand

// ######################################################################

/* uncomment one of the below lines to support a special chip on the DfMiniMp3 player
 * um einen speziellen Chip auf dem DfMiniMp3 Player zu ünterstützen bitte in eine der nächste Zeilen den Kommentar entfernen
 *
 * GD3200B:     bad behavior of getFolderTrackCount() - ignores the parameter folder
 *              bad behavior of callback OnPlayFinished - it is also called on advertise tracks
 * MH2024K16SS: no checksums
 * LISP3:       bad behavior of callback OnPlayFinished - it is also called on advertise tracks
 * MP3-TF-16P V3.0 with MH2024K24SS:
 *              very slow
 *              bad behavior of callback OnPlayFinished - it is also called on advertise tracks
 * LKP Player:  no ACK for requests (use Mp3ChipIncongruousNoAck for them)
 */
//#define DFMiniMp3_T_CHIP_GD3200B
//#define DFMiniMp3_T_CHIP_MH2024K16SS
//#define DFMiniMp3_T_CHIP_LISP3
//#define DFMiniMp3_T_CHIP_MH2024K24SS_MP3_TF_16P_V3_0
#define DFMiniMp3_T_CHIP_Mp3ChipIncongruousNoAck

// ######################################################################

/* uncomment the below line to disable shutdown via button (long press play/pause)
 * um ein Shutdown via Taste (long press Play/Pause) zu unterdrücken bitte in der nächste Zeile den Kommentar entfernen
 */
//#define DISABLE_SHUTDOWN_VIA_BUTTON

// ######################################################################

/* uncomment the below line to enable the rotary encoder for volume setting
 * um den Drehgeber zu unterstützen bitte in der nächste Zeile den Kommentar entfernen
 */
//#define ROTARY_ENCODER
/* uncomment the below line to enable the rotary encoder also for next and previous (only one click in one second)
 * um den Drehgeber auch für vor und zurück zu unterstützen bitte in der nächste Zeile den Kommentar entfernen
 */
//#define ROTARY_ENCODER_LONGPRESS

#ifdef ROTARY_ENCODER
#ifdef ALLinONE_Plus
// if using Rotary Encoder Buchse
//inline constexpr uint8_t   rotaryEncoderClkPin    = 31; // PE1
//inline constexpr uint8_t   rotaryEncoderDtPin     = 32; // PE2

// if using Opt Leiste (Male)
inline constexpr uint8_t   rotaryEncoderClkPin    = 36; // PF2
inline constexpr uint8_t   rotaryEncoderDtPin     = 37; // PF3
#else
inline constexpr uint8_t   rotaryEncoderClkPin    = A3; // A3
inline constexpr uint8_t   rotaryEncoderDtPin     = A4; // A4
#endif // ALLinONE_Plus
#endif // ROTARY_ENCODER

// ######################################################################

/* uncomment the below line to enable the poti for volume setting
 * um den Poti zu unterstützen bitte in der nächste Zeile den Kommentar entfernen
 */
//#define POTI

#ifdef POTI
#ifdef ALLinONE_Plus
inline constexpr uint8_t   potiPin    = A14; // AiO+ PF4
#else
inline constexpr uint8_t   potiPin    = A3 ; // AiO/Classic A3
#endif // ALLinONE_Plus
#endif // POTI

// ######################################################################

/* uncomment the below line to enable the neo ring
 * To have more features (show volume setting) uncomment also NEO_RING_EXT
 * um den Neo Ring zu unterstützen bitte in der nächste Zeile den Kommentar entfernen
 * um weitere Features einzuschalten, auch den Kommentar für NEO_RING_EXT entfernen
 */
//#define NEO_RING
//#define NEO_RING_EXT
//#define NEO_RING_2

#ifdef NEO_RING
#ifdef ALLinONE_Plus
inline constexpr uint8_t neoPixelRingPin = 10; // PB2 on AiOplus (Erweiterungsleiste (Female))
#else
inline constexpr uint8_t neoPixelRingPin = D5; // D5 on AiO/Classic
#endif // ALLinONE_Plus
inline constexpr uint8_t neoPixelNumber  = 24; // Total Number of Pixels
#ifdef NEO_RING_2
#ifdef ALLinONE_Plus
inline constexpr uint8_t neoPixelRingPin2= 14; // PC0 on AiOplus (Erweiterungsleiste (Female))
#else
inline constexpr uint8_t neoPixelRingPin2= D2; // D2 on AiO/Classic (only Every)
#endif // ALLinONE_Plus
inline constexpr uint8_t neoPixelNumber2 = 24; // Total Number of Pixels
#endif // NEO_RING_2
#endif // NEO_RING

// ######################################################################

/* uncomment the below line to enable the Speaker on/off for Classic to suppress noise
 * on startup and shutdown (automatically enabled on AiO and AiOplus)
 * um den Lautsprecher ein/aus Schalter für die Classic Variante zu unterstützen bitte
 * in der nächste Zeile den Kommentar entfernen (zur Unterdrückung der Ein- und Ausschaltgeräusche)
 * (automatisch eingeschaltet für AiO und AiOplus)
 */
//#define SPKONOFF

#ifdef SPKONOFF
#if not defined(ALLinONE_Plus) and not defined(ALLinONE)
inline constexpr uint8_t       ampEnablePin     = D6;
inline constexpr levelType     ampEnablePinType = levelType::activeHigh;
#endif
#endif // SPKONOFF

// ######################################################################

/* uncomment the below line to enable the Headphone Jack detection (automatically enabled on AiOplus)
 * um die Kopfhörer Erkennung einzuschalten bitte in der nächste Zeile den Kommentar entfernen
 * (automatisch eingeschaltet für AiOplus)
 */
//#define HPJACKDETECT

#ifdef HPJACKDETECT
#ifndef ALLinONE_Plus
inline constexpr uint8_t       dfPlayer_noHeadphoneJackDetect     = D8;
inline constexpr levelType     dfPlayer_noHeadphoneJackDetectType = levelType::activeLow;
#endif
#endif // HPJACKDETECT

// ######################################################################

/* uncomment the below line to ignore the RFID if it is already playing
 * um die selbe RFID zu ignorieren, wenn die bereits spielt, in der nächste
 * Zeile den Kommentar entfernen
 */
//#define DONT_ACCEPT_SAME_RFID_TWICE

/* uncomment the below line to resume playback if the RFID that started the
 * playback is detected again
 * um die Wiedergabe fortzusetzen, wenn die selbe RFID erkannt wird, die bereits
 * abgespielt wird, in der nächste Zeile den Kommentar entfernen
 */
//#define RESUME_ON_SAME_RFID

/* uncomment the below line to replay the last card or short cut if pressed play/pause
 * in Idle state
 * um die letzte Karte oder den letzten Short Cut wieder abzuspielen, wenn die Play/Pause Taste
 * im Idle State gedrückt wird, in der nächste Zeile den Kommentar entfernen
 */
//#define REPLAY_ON_PLAY_BUTTON

// ######################################################################

/* uncomment the below line(s) to enable the quiz or memory game
 * um das Quiz oder Memory Spiel zu aktivieren, in der nächste Zeile(n) den Kommentar entfernen
 */
//#define QUIZ_GAME
//#define MEMORY_GAME

// ######################################################################

/* uncomment the below line to store the last played card in EEPROM
 * um die letzte Karte im EEPROM zu speichern, in der nächste Zeile den Kommentar entfernen
 */
//#define STORE_LAST_CARD

// ######################################################################

/* uncomment the below line to enable special shortcut on startup via GPIO
 * um den spezial Shortcut beim Start via GPIO zu aktivieren, in der nächste Zeile den Kommentar entfernen
 */
//#define SPECIAL_START_SHORTCUT

#ifdef SPECIAL_START_SHORTCUT
#ifdef ALLinONE_Plus
inline constexpr uint8_t   specialStartShortcutPin     = 33; // PE3
#else
inline constexpr uint8_t   specialStartShortcutPin     = A6; // A6 on AiO/Classic
#endif // ALLinONE_Plus
inline constexpr levelType specialStartShortcutPinType = levelType::activeHigh;
inline constexpr uint8_t   specialStartShortcutFolder  = 1;
inline constexpr uint8_t   specialStartShortcutTrack   = 1;
#endif // SPECIAL_START_SHORTCUT

// ######################################################################

/* uncomment the below line to enable support for BT module
 * um die Unterstützung des BT Modules zu aktivieren, in der nächste Zeile den Kommentar entfernen
 */
//#define BT_MODULE

#ifdef BT_MODULE
#ifdef DFPlayerUsesHardwareSerial
inline constexpr uint8_t   btModuleOnPin               =  D2; // D2
inline constexpr uint8_t   btModulePairingPin          =  D3; // D3
#else
inline constexpr uint8_t   btModuleOnPin               =  D6; // D6
inline constexpr uint8_t   btModulePairingPin          =  D8; // D8
#endif
inline constexpr levelType btModuleOnPinType           = levelType::activeHigh;
inline constexpr levelType btModulePairingPinType      = levelType::activeHigh;
inline constexpr unsigned long btModulePairingPulse    = 500;
#endif // BT_MODULE

// ######################################################################

/* uncomment the below line to enable battery voltage measurement (not for ALLinONE, not recommended for TonUINO_Classic)
 * um die Batterie Spannungsmessung zu aktivieren, in der nächste Zeile den Kommentar entfernen
 * (nicht für ALLinONE, nicht empfohlen für TonUINO_Classic)
 */
//#define BAT_VOLTAGE_MEASUREMENT

#ifdef BAT_VOLTAGE_MEASUREMENT
#if not defined(ALLinONE_Plus) and not defined(ALLinONE)
inline constexpr uint8_t voltageMeasurementPin         = A5;
#endif // ALLinONE_Plus

#ifdef ALLinONE_Plus
inline constexpr float   voltageMeasurementCorrection  = 2.075; // Spannungsteiler 100k/100k
#endif
#ifdef TonUINO_Classic
inline constexpr float   voltageMeasurementCorrection  = 1.960; // Spannungsteiler 100k/100k
#endif
#ifdef TonUINO_Every
inline constexpr float   voltageMeasurementCorrection  = 2.007; // Spannungsteiler 100k/100k
#endif
#ifdef TonUINO_Every_4808
inline constexpr float   voltageMeasurementCorrection  = 2.007; // Spannungsteiler 100k/100k
#endif
#ifdef TonUINO_Esp32
inline constexpr float   voltageMeasurementCorrection  = 0.710; // Spannungsteiler 100k/100k
#endif

// for Li-Ion
inline constexpr float   batVoltageLow                 = 2.95;
inline constexpr float   batVoltageEmpty               = 2.90;
// for Li-PO
//inline constexpr float   batVoltageLow                 = 3.40;
//inline constexpr float   batVoltageEmpty               = 3.20;
#endif // BAT_VOLTAGE_MEASUREMENT

// ######################################################################

/* uncomment the below lines if you use Pololu Powerswitch or Traeger Platine for shutdown
 * wenn der Pololu Powerswitch oder die Traeger Platine für das Shutdown verwendet wird, in den nächsten Zeile den Kommentar entfernen
 */
//#define USE_POLOLU_SHUTDOWN
//#define USE_TRAEGER_PLATINE_SHUTDOWN

// ######################################################################

/* uncomment one of the below lines if you want to change the antenna gain of the MFRC522 module
 * wenn die Antennenverstärkung des MFRC522 Modules verändert werden soll, in der nächsten Zeilen einen Kommentar entfernen
 */
//#define MRFC522_RX_GAIN RxGain_18dB
//#define MRFC522_RX_GAIN RxGain_23dB
//#define MRFC522_RX_GAIN RxGain_33dB // default
//#define MRFC522_RX_GAIN RxGain_38dB
//#define MRFC522_RX_GAIN RxGain_43dB
//#define MRFC522_RX_GAIN RxGain_48dB
//#define MRFC522_RX_GAIN RxGain_min  // 18dB
//#define MRFC522_RX_GAIN RxGain_avg  // 33dB
//#define MRFC522_RX_GAIN RxGain_max  // 48dB

// ######################################################################

/* uncomment the below lines if you want to have the Jukebox modification card
 * wenn du die Jukebox haben willst, in den nächsten Zeile den Kommentar entfernen
 */
//#define MODIFICATION_CARD_JUKEBOX

#ifdef MODIFICATION_CARD_JUKEBOX
inline constexpr uint8_t jukebox_max_cards  = 10;
#endif

// ######################################################################

/* Enable this definition to activate animated LED button support via the LedManager.
 *
 * LED behavior:
 * - Startup:        All LEDs blink one after another.
 * - Awaiting input: All LEDs blink synchronously.
 * - Playing:        All LEDs stay on continuously.
 * - Paused:         Only the Play/Pause LED blinks.
 * - Shutdown:       All LEDs are turned off.
 * - On a valid button press, all LEDs blink once by toggling their current state.
 *
 * Use a series resistor (e.g. 1KΩ) per LED to limit current.
 *
 * ----------------------------------------------------------------------
 *
 * Nachfolgenden Kommentar entfernen, um animierte LED-Tasten über den LedManager zu nutzen.
 *
 * LED-Verhalten:
 * - Beim Start:          Alle LEDs blinken nacheinander.
 * - Wartet auf Eingabe:  Alle LEDs blinken synchron.
 * - Wiedergabe läuft:    Alle LEDs leuchten dauerhaft.
 * - Wiedergabe pausiert: Nur die Play/Pause-LED blinkt.
 * - Abschaltung:         Alle LEDs werden ausgeschalten.
 * - Bei einem gültigen Tastendruck blinken alle LEDs einmal, indem ihr aktueller Zustand invertiert wird.
 *
 * Verwende einen Widerstand (z.B. 1KΩ) in Reihe zu jeder LED zur Strombegrenzung.
 */

//#define USE_LED_BUTTONS

#ifdef USE_LED_BUTTONS
inline constexpr uint8_t led_play_pin = A5;
inline constexpr uint8_t led_up_pin   = D6;
inline constexpr uint8_t led_down_pin = D5;

inline constexpr unsigned long led_update_interval = 800; // ms
inline constexpr unsigned long led_short_blink     = 400; // ms
#endif // USE_LED_BUTTONS

/* #################################################################################################
 * ##### normally, you don't have to edit lines below                   ############################
 * ##### mormalerweise müssen die folgende Zeilen nicht editiert werden ############################
 * #################################################################################################
 */

// ####### rules for buttons ############################

inline constexpr uint8_t lastSortCut         =  24;
#ifdef BUTTONS3X3
#ifdef FIVEBUTTONS
static_assert(false, "The 3x3 Button board doesn't have 5 Buttons");
#endif
inline constexpr uint8_t buttonExtSC_begin   = 101;
inline constexpr uint8_t buttonExtSC_buttons =  18; // <= lastSortCut
#endif // BUTTONS3X3

inline constexpr uint32_t  buttonLongPress       = 1000; // timeout for long press button in ms
inline constexpr uint32_t  buttonLongPressRepeat =  200; // timeout for long press button repeat in ms

/***************************************************************************
 ** Classic ****************************************************************
 ***************************************************************************/

#if defined(TonUINO_Classic) or defined(TonUINO_Every) or defined(TonUINO_Every_4808)
// ####### buttons #####################################

inline constexpr uint8_t   buttonPausePin  = A0;

#if defined(BUTTONS3X3)
inline constexpr uint8_t   button3x3Pin    = A3;
inline constexpr uint8_t   buttonUpPin     = A1;
inline constexpr uint8_t   buttonDownPin   = A2;
inline constexpr uint32_t  button3x3DbTime = 50; // Debounce time in milliseconds (default 50ms)
#elif defined(FIVEBUTTONS)
inline constexpr uint8_t   buttonUpPin     = A3;
inline constexpr uint8_t   buttonDownPin   = A4;
inline constexpr uint8_t   buttonFourPin   = A1;
inline constexpr uint8_t   buttonFivePin   = A2;
#else
inline constexpr uint8_t   buttonUpPin     = A1;
inline constexpr uint8_t   buttonDownPin   = A2;
#endif

inline constexpr levelType buttonPinType   = levelType::activeLow;
inline constexpr uint32_t  buttonDbTime    = 25; // Debounce time in milliseconds (default 25ms)

// ####### chip_card ###################################

inline constexpr uint32_t cardCookie      = 0x1337b347;
inline constexpr uint8_t  cardVersion     = 0x02;
inline constexpr byte     mfrc522_RSTPin  =  9;
inline constexpr byte     mfrc522_SSPin   = 10;
inline constexpr uint8_t  cardRemoveDelay =  3;

// ####### mp3 #########################################

#ifdef DFPlayerUsesHardwareSerial
inline constexpr HardwareSerial &dfPlayer_serial         = Serial1; // D0 RX, D1 TX (Every)
#else
inline constexpr uint8_t       dfPlayer_receivePin      = 2;
inline constexpr uint8_t       dfPlayer_transmitPin     = 3;
#endif

inline constexpr uint8_t       maxTracksInFolder        = 255;
inline constexpr uint8_t       dfPlayer_busyPin         = 4;
inline constexpr levelType     dfPlayer_busyPinType     = levelType::activeHigh;
#if defined(DFMiniMp3_T_CHIP_MH2024K24SS_MP3_TF_16P_V3_0)
inline constexpr unsigned long dfPlayer_timeUntilStarts = 2500;
#elif defined(DFMiniMp3_T_CHIP_GD3200B)
inline constexpr unsigned long dfPlayer_timeUntilStarts = 2500;
#else
inline constexpr unsigned long dfPlayer_timeUntilStarts = 1200;
#endif

// ####### tonuino #####################################

inline constexpr uint8_t       shutdownPin      = 7;
#ifdef USE_POLOLU_SHUTDOWN
inline constexpr levelType     shutdownPinType  = levelType::activeHigh;
#else
inline constexpr levelType     shutdownPinType  = levelType::activeLow;
#endif
inline constexpr uint8_t       openAnalogPin    = A7;
inline constexpr unsigned long cycleTime        = 50;
#endif /* TonUINO_Classic or TonUINO_Every or TonUINO_Every_4808 */

/***************************************************************************
 ** AiO plus ***************************************************************
 ***************************************************************************/

#ifdef ALLinONE_Plus
// ####### buttons #####################################

#if not defined(THREEBUTTONS) and not defined(BUTTONS3X3)
#define FIVEBUTTONS
#endif

#define SPKONOFF
#define HPJACKDETECT

inline constexpr uint8_t   buttonPausePin  = A0;

#ifdef BUTTONS3X3
inline constexpr uint8_t   button3x3Pin    = A2;
inline constexpr uint8_t   buttonUpPin     = A4;
inline constexpr uint8_t   buttonDownPin   = A3;
inline constexpr uint32_t  button3x3DbTime = 50; // Debounce time in milliseconds (default 50ms)
#else
inline constexpr uint8_t   buttonUpPin     = A2;
inline constexpr uint8_t   buttonDownPin   = A1;
#endif

#ifdef FIVEBUTTONS
inline constexpr uint8_t   buttonFourPin   = A4;
inline constexpr uint8_t   buttonFivePin   = A3;
#endif

inline constexpr levelType buttonPinType   = levelType::activeLow;
inline constexpr uint32_t  buttonDbTime    = 25; // Debounce time in milliseconds (default 25ms)

// ####### chip_card ###################################

inline constexpr uint32_t cardCookie      = 0x1337b347;
inline constexpr uint8_t  cardVersion     = 0x02;
inline constexpr byte     mfrc522_RSTPin  = 11;
inline constexpr byte     mfrc522_SSPin   =  7;
inline constexpr uint8_t  cardRemoveDelay =  3;

// ####### mp3 #########################################

#define DFPlayerUsesHardwareSerial
inline constexpr HardwareSerial &dfPlayer_serial         = Serial3;

inline constexpr uint8_t        maxTracksInFolder        = 255;
inline constexpr uint8_t        dfPlayer_busyPin         = 13;
inline constexpr levelType      dfPlayer_busyPinType     = levelType::activeHigh;
inline constexpr unsigned long  dfPlayer_timeUntilStarts = 1000;
inline constexpr uint8_t        dfPlayer_noHeadphoneJackDetect     = 21;
inline constexpr levelType      dfPlayer_noHeadphoneJackDetectType = levelType::activeLow;

// ####### tonuino #####################################

inline constexpr uint8_t       shutdownPin           = 27;
inline constexpr levelType     shutdownPinType       = levelType::activeLow;
inline constexpr uint8_t       ampEnablePin          = 19;
inline constexpr levelType     ampEnablePinType      = levelType::activeLow;
inline constexpr uint8_t       usbAccessPin          = 20;
inline constexpr levelType     usbAccessPinType      = levelType::activeHigh;
inline constexpr uint8_t       voltageMeasurementPin = A6;
inline constexpr uint8_t       openAnalogPin         = A7;
inline constexpr unsigned long cycleTime             = 50;
#endif /* ALLinONE_Plus */

/***************************************************************************
 ** AiO ********************************************************************
 ***************************************************************************/

#ifdef ALLinONE
// ####### buttons #####################################

#if not defined(THREEBUTTONS) and not defined(BUTTONS3X3)
#define FIVEBUTTONS
#endif

#define SPKONOFF

inline constexpr uint8_t   buttonPausePin  = A0;

#ifdef BUTTONS3X3
inline constexpr uint8_t   button3x3Pin    = A2;
inline constexpr uint8_t   buttonUpPin     = A4;
inline constexpr uint8_t   buttonDownPin   = A3;
inline constexpr uint32_t  button3x3DbTime = 50; // Debounce time in milliseconds (default 50ms)
#else
inline constexpr uint8_t   buttonUpPin     = A2;
inline constexpr uint8_t   buttonDownPin   = A1;
#endif

#ifdef FIVEBUTTONS
inline constexpr uint8_t   buttonFourPin   = A4;
inline constexpr uint8_t   buttonFivePin   = A3;
#endif

inline constexpr levelType buttonPinType   = levelType::activeLow;
inline constexpr uint32_t  buttonDbTime    = 25; // Debounce time in milliseconds (default 25ms)

// ####### chip_card ###################################

inline constexpr uint32_t cardCookie      = 0x1337b347;
inline constexpr uint8_t  cardVersion     = 0x02;
inline constexpr byte     mfrc522_RSTPin  =  9;
inline constexpr byte     mfrc522_SSPin   = 10;
inline constexpr uint8_t  cardRemoveDelay =  3;

// ####### mp3 #########################################

inline constexpr uint8_t       dfPlayer_receivePin      = 2;
inline constexpr uint8_t       dfPlayer_transmitPin     = 3;

inline constexpr uint8_t       maxTracksInFolder        = 255;
inline constexpr uint8_t       dfPlayer_busyPin         = 4;
inline constexpr levelType     dfPlayer_busyPinType     = levelType::activeHigh;
inline constexpr unsigned long dfPlayer_timeUntilStarts = 1000;

// ####### tonuino #####################################

inline constexpr uint8_t       shutdownPin      = 7;
inline constexpr levelType     shutdownPinType  = levelType::activeLow;
inline constexpr uint8_t       ampEnablePin     = 8;
inline constexpr levelType     ampEnablePinType = levelType::activeLow;
inline constexpr uint8_t       usbAccessPin     = A5;
inline constexpr levelType     usbAccessPinType = levelType::activeHigh;
inline constexpr uint8_t       openAnalogPin    = A7;
inline constexpr unsigned long cycleTime        = 50;
#endif /* ALLinONE */

/***************************************************************************
 ** Esp32 ******************************************************************
 ***************************************************************************/

#if defined(TonUINO_Esp32)
#if TonUINO_Esp32 == 100
// ####### buttons #####################################

inline constexpr uint8_t   buttonPausePin  = A0;

#if defined(BUTTONS3X3)
inline constexpr uint8_t   button3x3Pin    = A3;
inline constexpr uint8_t   buttonUpPin     = A1;
inline constexpr uint8_t   buttonDownPin   = A2;
inline constexpr uint32_t  button3x3DbTime = 50; // Debounce time in milliseconds (default 50ms)
#elif defined(FIVEBUTTONS)
inline constexpr uint8_t   buttonUpPin     = A3;
inline constexpr uint8_t   buttonDownPin   = A4;
inline constexpr uint8_t   buttonFourPin   = A1;
inline constexpr uint8_t   buttonFivePin   = A2;
#else
inline constexpr uint8_t   buttonUpPin     = A1;
inline constexpr uint8_t   buttonDownPin   = A2;
#endif

inline constexpr levelType buttonPinType   = levelType::activeLow;
inline constexpr uint32_t  buttonDbTime    = 25; // Debounce time in milliseconds (default 25ms)

// ####### chip_card ###################################

inline constexpr uint32_t cardCookie      = 0x1337b347;
inline constexpr uint8_t  cardVersion     = 0x02;
inline constexpr byte     mfrc522_RSTPin  =  D9;
inline constexpr byte     mfrc522_SSPin   = D10;
inline constexpr uint8_t  cardRemoveDelay =  D3;

// ####### mp3 #########################################

#ifdef DFPlayerUsesHardwareSerial
inline constexpr HardwareSerial &dfPlayer_serial         = Serial0; // D0 RX, D1 TX (Esp32)
#else
inline constexpr uint8_t       dfPlayer_receivePin      = D2;
inline constexpr uint8_t       dfPlayer_transmitPin     = D3;
#endif

inline constexpr uint8_t       maxTracksInFolder        = 255;
inline constexpr uint8_t       dfPlayer_busyPin         = D4;
inline constexpr levelType     dfPlayer_busyPinType     = levelType::activeHigh;
#if defined(DFMiniMp3_T_CHIP_MH2024K24SS_MP3_TF_16P_V3_0)
inline constexpr unsigned long dfPlayer_timeUntilStarts = 2500;
#elif defined(DFMiniMp3_T_CHIP_GD3200B)
inline constexpr unsigned long dfPlayer_timeUntilStarts = 2500;
#else
inline constexpr unsigned long dfPlayer_timeUntilStarts = 1200;
#endif

// ####### tonuino #####################################

inline constexpr uint8_t       shutdownPin      = D7;
#ifdef USE_POLOLU_SHUTDOWN
inline constexpr levelType     shutdownPinType  = levelType::activeHigh;
#else
inline constexpr levelType     shutdownPinType  = levelType::activeLow;
#endif
inline constexpr uint8_t       openAnalogPin    = A7;
inline constexpr unsigned long cycleTime        = 50;

#else //  TonUINO_Esp32 == *
static_assert(false, "Not supported Esp32 HW type");
#endif  //  TonUINO_Esp32 == *

#endif /* TonUINO_Esp32 */


// ####### some helper fuctions #####################################

template <typename T> void PROGMEM_read(const T * sce, T& dest)
{
  memcpy_P (&dest, sce, sizeof (T));
}



#endif /* SRC_CONSTANTS_HPP_ */

Mir scheint die Play/Pause Taste dauerhaft gedrückt. Hat ev. einen Kurzschluss.

Teste doch mal die anderen Buttons bevor Du eine Karte auflegst.
Werden die dann in der Konsole angezeigt?

Sollte dann so aussehen:


 _____         _____ _____ _____ _____
|_   _|___ ___|  |  |     |   | |     |
  | | | . |   |  |  |-   -| | | |  |  |
  |_| |___|_|_|_____|_____|_|___|_____|
TonUINO Version 3.1 - refactored by Boerge1
TonUINO_NoBl modified by NoBl
created by Thorsten Voß and licensed under GNU/GPL.
Information and contribution at https://tonuino.de.

V 3.2.1 23.11.24  uploaded: Nov 30 2024 at 00:43:00

Classic Nano 5 Buttons mit MH2024K-24SS und 2500 ms Verzögerung
 
Ver:2
Vol:25 1 7 25 5 15
EQ:1

ST:5
IB:1
AL:0
AP:1111
PCR:0
MFRC522:178
Volume: 7
track_count: 184
enter Idle
timer started
btn/cmd: start/start
enqueue mp3 262 0
play mp3 262
isPlaying: 1
isPlaying: 0
isPlaying: 1
isPlaying: 0
Track end: 15
btn/cmd: four/bright_up
btn/cmd: up/bright_up
btn/cmd: pause/pause
btn/cmd: down/bright_down
btn/cmd: five/bright_down

Gerade nochmal getestet:
Gleiches Verhalten bei mir, wenn eine der Tasten dauerhaften Masseschluss hat.
Karten werden zwar erkannt, aber keine Reaktion / Anzeige in der Konsole bei Tastendruck

Danke für den Tip. Tatsächlich; wenn ich A1 u. A2 gedrückt halte kommt “admin-modus”.

 _____         _____ _____ _____ _____ 
|_   _|___ ___|  |  |     |   | |     |
  | | | . |   |  |  |-   -| | | |  |  |
  |_| |___|_|_|_____|_____|_|___|_____|
TonUINO Version 3.x - refactored by Boerge1

created by Thorsten Voß and licensed under GNU/GPL.
Information and contribution at https://tonuino.de.


C 3
Ver:2
Vol:25 5 15 25 5 15
EQ:1
ST:0
IB:1
AL:0
AP:1111
PCR:0
MFRC522:130
Volume: 15
track_count: 647
enter Idle
btn/cmd: start/start
enqueue mp3 262 0
play mp3 262
isPlaying: 1
isPlaying: 0
Track end: 527
Track end: 527
btn/cmd: allLong/admin
enter AdmAllow
enter AdmEntry
enqueue mp3 900 0
play mp3 900
isPlaying: 1
isPlaying: 0
Track end: 580

Ich hatte meine Löstellen überprüft indem ich auf der Classic Platine den Widerstand der einzelnen Anschlusspunkte gemessen hatte (GND untereinander, A.. gegeneinander u. gegen GND) das passt.

Jetzt hab ich tatsächlich mal mit dem Nano drin gemessen. –> Durchgang zwischen A0 u. GND. Selbes Spiel am Nano, wenn ich den rausnehme. Hab an meinem 2. jungfräulichen Nano gemessen. Bei dem ist das auch so. Ist das normal oder haben tatsächlich beide einen “Treffer”?

Bei meinem Nano habe ich da keinen Durchgang.

Schau Dir die Lötstellen auf den Nanos sehr genau an. Professionell gelötet ist nicht unbedingt immer gut gelötet.

Wenn so gar nichts geht, kann man in der constants.hpp auch den Pin für die Pause -Taste ändern:

In Zeile 389 von

inline constexpr uint8_t   buttonPausePin  = A0;

ändern in:
inline constexpr uint8_t buttonPausePin = A3;

Dann müsstest Du die Pause Taste an A3 anschließen (hast ja „nur“ die 3-Tasten Version gebaut) und der TonUINO würde das Signal an A0 ignorieren.

Danke NoBI,

Funktioniert jetzt.

2 „Gefällt mir“