Pages: [1]   Go Down
Author Topic: String Library Bugs? Substring and Index Of..  (Read 460 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...

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");


Pages: [1]   Go Up
Jump to: