diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index a02b1439..f8e4c2a3 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -2021,7 +2021,7 @@ void pwm_interrupt_handler() { if (wav_position < (WAV_DATA_LENGTH<<3) - 1) { // set pwm level // allow the pwm value to repeat for 8 cycles this is >>3 - pwm_set_gpio_level(AUDIO_OUT_PIN, WAV_DATA[wav_position>>3]); + pwm_set_gpio_level(AUDIO_OUT_PIN, buffer[wav_position>>3]); wav_position++; } else { // reset to start