Here’s my code to make it more clear.
Line 28-31 set LED to indicate to me that it has connected and the second is to allow time for it to establish a stable connection. I have read some postings indicating that repeated postings or requests in quick succession can cause the red led sos. i don’t see the red anymore but i do see a blue breathing led from time to time.
Line 35-47 if the client has sent some data. while the client is sending data send the temp over and over every 9.5 secs. if the client stops sending data then start over at line 26.
Thanks for the tips i will make the changes to millis(). i hope this helps with the crashing but i don’t think this will help the odd Character that i get on the print of temp.
Should i be putting a “millis wait” before manipulating the temp value after the reading of A0 to allow the AtoD time to process?
Also in the Example you posted there is a “while(!Serial.available()) SPARK_WLAN_Loop();” what is this?
// telnet defaults to port 23
TCPServer server = TCPServer(23);
int led = D7;
int Sensor = A0;
// start listening for clients
// echo all available bytes back to the clients
// Read Sensor value
temp = analogRead(Sensor)*3.3/4095.0;
temp = temp - 0.5;
temp = temp * 100;
// Send Temperature to Clients
// if no client is yet connected, check for a new connection
client = server.available();