Hi,
some hints for 2 questions, please?
My multitrack looper project uses audio library and threads library, things are going on FAST.
Up to now I have used serial.print() for debugging in arduino.
A) Are there more advanced still easy ways available?
B) I am trying to print out global int variables, it only prints the first Variable "917", the rest is rubbish, what's wrong there?
I tried
*(&dummy + i*4)
too, but it did not get right results too. How is the organisation of global variables in memory?
Thanks in advance!
Christof
some hints for 2 questions, please?
My multitrack looper project uses audio library and threads library, things are going on FAST.
Up to now I have used serial.print() for debugging in arduino.
A) Are there more advanced still easy ways available?
B) I am trying to print out global int variables, it only prints the first Variable "917", the rest is rubbish, what's wrong there?
I tried
*(&dummy + i*4)
too, but it did not get right results too. How is the organisation of global variables in memory?
Code:
int dummy=917;
int dummy2=918;
int maxBuf= 0;
uint maxRecLength= 44100*20; //44100*5; 3*sdBufLen;
uint actPos= 0;
uint posInBuf= 0;
int recTrack= 0;
int recBuf= 0;
int readBuf= -1;
int writeBuf= -1;
int writePos= 0;
int readPos= 0;
int endFlag= 0;
int recStatus= 1;
.....
void lsGlobals() {
Serial.print("\nGlob: ");
for(int i=0; i<10; i++) {
Serial.printf(" %d", *(&dummy + i) );
}
}
Thanks in advance!
Christof