Skip to content

Commit acdc9de

Browse files
authored
update: M5.Speaker.setVolume works with M5.Speaker.tone . (#205)
1 parent 7af7b6f commit acdc9de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utility/Speaker.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ void SPEAKER::end() {
2121
void SPEAKER::tone(uint16_t frequency) {
2222
if(!_begun) begin();
2323
ledcWriteTone(TONE_PIN_CHANNEL, frequency);
24+
ledcWrite(TONE_PIN_CHANNEL, 0x400 >> _volume);
2425
}
2526

2627
void SPEAKER::tone(uint16_t frequency, uint32_t duration) {

0 commit comments

Comments
 (0)