ESP32 Synth. command not working

Making your program work.
xhale51
Posts: 2
Joined: Tue Jul 04, 2023 10:26 pm

ESP32 Synth. command not working

Post by xhale51 »

Hello,

I've been using the fluxamasynth arduino shield for a project, and it has worked great. I decided to try the ESP platform for the smaller package and additional features. Currently I have confirmed the chip is working by uploading a blink code on one of the pins.

After that, I tried copying over my arduino code. It compiles fine, but gets stuck during runtime when the synth. command is called.

For example, this is my main loop

Code: Select all

void loop() {
  digitalWrite(debug, HIGH);
  delay(1000);
  digitalWrite(debug, LOW);
  delay(1000);
  }
With the following setup, I can see the blink on this pin. However, as soon as I uncomment the synth. commands, the program hangs at runtime. If I call the synth. command in the loop instead of setup, I get the same result.

Code: Select all

#include <Fluxamasynth.h>
#include <PgmChange.h>
#include"pitches.h"

//Fluxamasynth synth;     // create a synth object
Fluxamasynth synth = Fluxamasynth();
byte instrument = 0;
int volume = 0;
int debug = 32;

void setup() {
  pinMode(debug, OUTPUT);
  
  */
  synth.setMasterVolume(volume);
  synth.programChange(0, 0, instrument);
  */
  
}
I've tried different methods of creating the synth object. I've verified that my Fluxamasynth.h file is updated to include esp platform. Any other things that I could check?

Thanks for any help

xhale51
Posts: 2
Joined: Tue Jul 04, 2023 10:26 pm

Re: ESP32 Synth. command not working

Post by xhale51 »

Quick note, while formatting this post I made a small error where I have */ instead of /*. In actuality, the commented portion is done correctly.

Post Reply