Skip to content

Commit a2e9e2b

Browse files
committed
Update buzzer to default to 21 if GPIO 32 is not defined
1 parent 5163fbf commit a2e9e2b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

usermods/buzzer/buzzer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55

66
#define USERMOD_ID_BUZZER 900
77
#ifndef USERMOD_BUZZER_PIN
8+
#ifdef GPIO_NUM_32
89
#define USERMOD_BUZZER_PIN GPIO_NUM_32
10+
#else
11+
#define USERMOD_BUZZER_PIN 21
12+
#endif
913
#endif
1014

1115
/*
1216
* Usermods allow you to add own functionality to WLED more easily
1317
* See: https://github.com/wled-dev/WLED/wiki/Add-own-functionality
1418
*
15-
* Using a usermod:
16-
* 1. Copy the usermod into the sketch folder (same folder as wled00.ino)
17-
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp
1819
*/
1920

2021
class BuzzerUsermod : public Usermod {

0 commit comments

Comments
 (0)