Go Down

Topic: Adafruit Wave Audio Shield with LIDAR Micro TFMINI Sensor playback issues. (Read 270 times) previous topic - next topic

Marco527

Hello,
I have the Adafruit audio shield and LIDAR MICRO TF MINI proximity sensor connected to an arduino Uno atmega 328. When running code for LIDAR only I get accurate distances when running code for waveshield only I get the expected audio playback. My issue is when I am attempting to playback audio files given if / switch statements. For example:
 
switch ((dist <= 400) && (dist >= 200)) {
case 1:
playcomplete("SOUND1.wav");
}

No audio playback is heard when I run the program even though my lidar sensor is picking up data within the range (cm). Both work separately but not together. I'm not a programmer and barely know intro C++.
I've included all neccessary libraries and I'm using a mixture of 3 different source codes to achieve my desired result. I want my LIDAR sensor to read distances and output audio recordings when the lidar distance falls within a specified range as shown above.
 

Go Up