I have a sketch to measure frequency and I want to display the name of the note. As my input comes from a celtic harp I have approx 40 strings (although digital strings that represent names of real life strings is a bit confusing
). I decided to give them frequencies and names with two arrays.
Everything locks up! :o I painstakingly commented all lines and found that the instruction that gives problems is the definition "String stringName etc." - I mean - when I activate it the display does not show the initializing screens and no further results come out. As soon as I comment it returns to normal. No problem with the int array. No messages at compile time though it looks like a memory problem - writing over some reserved area or such.
Any hints on how to go ahead?
Tks
F
…
//variables for tuning *** Mib Eb scale
//frequenza nota "esatta" moltiplicata per dieci
int stringFreq[40] = {1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1};//nome della nota
String stringNAME[40] = {"A# LA#5","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd",
"abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd",
"abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd",
"abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd","abcd"};void setup(){
Serial.begin(9600);
Serial.println("Inizialize...");display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Impostare l'indirizzo i2c annotato in precedenza
display.clearDisplay(); //Pulisce il buffer da inviare al display
display.setTextSize(2); //Imposta la grandezza del testo
display.setTextColor(WHITE); //Imposta il colore del testo (Solo bianco)
display.setCursor(0,0); //Imposta la posizione del cursore (Larghezza,Altezza)
display.println("aaaaa"); //Stringa da visualizzare
display.display(); //Invia il buffer da visualizzare al display
delay(1000);...