Brian Watts
Published

Star Wars Reactive Sound Board

Device that listens to vocal/audio cues and provides a response from a big bank of Star Wars sound clips.

Star Wars Reactive Sound Board

Things used in this project

Story

Read more

Schematics

Board

Board

Code

Code

ADA
Code
    .

code star wars contest.txt

ADA
Code. - ' ?
*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^

Credits

Brian Watts

Brian Watts

3 projects • 7 followers
I'm Brian.

Comments