ich glaube wir haben es fast geschafft
es hängt wohl noch an einer kleinigkeit
also ich übergebe das '#' Zeich an den string im php script
hier der Code-ausschnitt
$ergebnis = $res->fetch_object();
$binarydata = '@';
$binarydata .= '-';
$binarydata .= pack ('a4a6a5', $ergebnis->id.'-',$ergebnis->temp.'-',$ergebnis->hum);
$binarydata .= '#';
echo $binarydata;
im browser sehe ich die Kontrollausgabe
@-385-22.00-56.00#
geht also
im arduino-sketch habe ich das geändert
else if (response=='#')
{
Serial.println("ich bin am ende des strings");
text[charcount] = '\0';
charcount=0;
read = false;
Serial.print(text);
// Serial.println("ich bin VOR der Pharsestring function");
parseString(text);
}
das ist die Ausgabe
DHT22 - Test!
27.04.2014
16:57:56
connecting...
jetzt der wasserstand
20.69
jetzt die temp ==>:
25.00
jetzt die Luftfeuchte ==>:
41.10
connected
Verbunden...sende Daten...fertig!
HTTP/1.1 200 OK
Date: Sun, 27 Apr 2014 14:52:38 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.4-14+deb7u8
Vary: Accept-Encoding
Content-Length: 18
Content-Type: text/html
ich bin VOR response >=32......
ich bin in response >=32.......
@ich bin VOR response >=32......
ich bin in response >=32.......
-ich bin VOR response >=32......
ich bin in response >=32.......
3ich bin VOR response >=32......
ich bin in response >=32.......
8ich bin VOR response >=32......
ich bin in response >=32.......
7ich bin VOR response >=32......
ich bin in response >=32.......
-ich bin VOR response >=32......
ich bin in response >=32.......
2ich bin VOR response >=32......
ich bin in response >=32.......
5ich bin VOR response >=32......
ich bin in response >=32.......
.ich bin VOR response >=32......
ich bin in response >=32.......
0ich bin VOR response >=32......
ich bin in response >=32.......
0ich bin VOR response >=32......
ich bin in response >=32.......
-ich bin VOR response >=32......
ich bin in response >=32.......
4ich bin VOR response >=32......
ich bin in response >=32.......
1ich bin VOR response >=32......
ich bin in response >=32.......
.ich bin VOR response >=32......
ich bin in response >=32.......
1ich bin VOR response >=32......
ich bin in response >=32.......
0ich bin VOR response >=32......
ich bin in response >=32.......
#
disconnecting.
wie du siehst bekommt er zwar '#' geliefert
in der if-abfrage scheint esihn jedoch nicht zu interessieren
da er dort nie reinläuft
sonst müsste er im serial-monitor zumindest
das ausgeben
Serial.println("ich bin am ende des strings");
irgendwie klappt die Abfrage mit dem Zeichen nicht