From a2e9e2b7d1de92c6f254761f6317113c3a8b99cd Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 28 Jun 2025 14:45:13 +0100 Subject: [PATCH] Update buzzer to default to 21 if GPIO 32 is not defined --- usermods/buzzer/buzzer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usermods/buzzer/buzzer.cpp b/usermods/buzzer/buzzer.cpp index 60db08abc..9d62fc20c 100644 --- a/usermods/buzzer/buzzer.cpp +++ b/usermods/buzzer/buzzer.cpp @@ -5,16 +5,17 @@ #define USERMOD_ID_BUZZER 900 #ifndef USERMOD_BUZZER_PIN +#ifdef GPIO_NUM_32 #define USERMOD_BUZZER_PIN GPIO_NUM_32 +#else +#define USERMOD_BUZZER_PIN 21 +#endif #endif /* * Usermods allow you to add own functionality to WLED more easily * See: https://github.com/wled-dev/WLED/wiki/Add-own-functionality * - * Using a usermod: - * 1. Copy the usermod into the sketch folder (same folder as wled00.ino) - * 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp */ class BuzzerUsermod : public Usermod {