Hardware components | ||||||
| × | 1 |
Star Wars Contest.
-to be edited-
*7
*8
/^ada
#define MICROPHONE_PIN DAC1
#define SPEAKER_PIN DAC2
#define BUTTON_PIN A0
#define BROADCAST_PORT 3443
#define UDP_BROADCAST_PORT 3444
#define AUDIO_BUFFER_MAX 8192
//#define SERIAL_DEBUG_ON true
//#define AUDIO_TIMING_VAL 125 /* 8,000 hz */
#define AUDIO_TIMING_VAL 62 /* 16,000 hz */
//#define AUDIO_TIMING_VAL 50 /* 20,000 hz */
UDP Udp;
IPAddress broadcastAddress(255,255,255,255);
int audioStartIdx = 0, audioEndIdx = 0;
int rxBufferLen = 0, rxBufferIdx = 0;
//uint16_t audioBuffer[AUDIO_BUFFER_MAX];
uint8_t txBuffer[AUDIO_BUFFER_MAX];
//uint8_t rxBuffer[AUDIO_BUFFER_MAX];
SimpleRingBuffer audio_buffer;
SimpleRingBuffer recv_buffer;
// IntervalTimer readMicTimer;
// IntervalTimer sendAudioTimer;
/ / / g^
Comments