Go Down

Topic: String Library Bugs? Substring and Index Of.. (Read 726 times) previous topic - next topic


I've include in my librarys WString 0.8;
And i tryng get a data from browser using method get, to filter and print in lcd.
But the function substring not working...

Code: [Select]

if (c == '\n') {
       lcd.print("lendo cmd" + linhaEntrada.length()) ;
         lcd.print(linhaEntrada) ;
         //Analise aqui o conteudo enviado pelo submit
           // se a linha recebida contem GET e R1=ON etnão ativa o pino do rele
             digitalWrite(pinDigRele,HIGH) ;
             releAtivado=true ;
               lcd.print("rele ativado");

// its not working... indexOf and substring
             int textoini = linhaEntrada.indexOf("=");
             txtWebLcd = linhaEntrada.substring(textoini+1,textoini+16); //expample
             Serial.println(txtWebLcd); //nothing showed
             Serial.println(textoini); /nothing showed
             Serial.println(linhaEntrada.substring(1,2)); //using directly /nothing showed  
             lcd.print("conteudo L1");

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131