acid-drop/src/Speaker.h

18 lines
384 B
C
Raw Normal View History

#pragma once
#include <Arduino.h>
2024-06-05 22:18:23 +00:00
#include <AudioFileSourcePROGMEM.h>
#include <AudioGeneratorRTTTL.h>
#include <AudioOutputI2S.h>
2024-06-05 22:18:23 +00:00
#include <driver/i2s.h>
#include "pins.h"
#define BOARD_I2S_PORT I2S_NUM_0
#define SAMPLE_RATE 44100
void setupI2S();
void playTone(float frequency, int duration, int volume = 16383);
void playRTTTL(const char* rtttl);
void playNotificationSound();