I have been warned away from strings or Strings, so I have revamped an old project to get rid of them, but I have to send data , which is now a mix of chars and integers, via a RS232 link to a PC for logging.
The user will be using an excel type program to display how they like, so I could send an integer and tell them how to interpret the data?
I can send all the headers fine via newsoftserial ( this project was done in v22 ) , and the Megunalink terminal displays all the headings i setup fine, but not the subsequent data. ( the monitor displays fine - I have reduced the number of prints for testing)
I have tried sending with the normal hardware serial but wasted many days trying, so now I am using the NSS version.
I have spent a lot of time sorting out other silly errors, and my brain hurts !
A bit of guidance will be appreciated....
(The part in setup logs fine, but not in the loop )
( in set up )
Serial.print (clockyear);
Serial.print(",");
Serial.print(clockmonth);
Serial.print(",");
Serial.print(clockday);
Serial.print(",");
Serial.print (clockhours);
Serial.print(",");
Serial.print (clockmins);
Serial.print(",");
if ( searching == HIGH ) {
Serial.print ("searching,");
}
else {
Serial.print ("locked,");
}
if ( queue == HIGH ) {
Serial.print ("NORMAL,");
}
else {
Serial.print ("EXPRESS,");
}
// Serial.print(" TICKET NUMBER= ");
Serial.print (number);
Serial.print(",");
Serial.print ("PRINTING");
Serial.println(",");
and in loop :-
hardwired.print ( clockyear);
hardwired.print(",");
hardwired.print(clockmonth);
hardwired.print(",");
hardwired.print(clockday);
hardwired.print(",");
hardwired.print (clockhours);
hardwired.print(",");
hardwired.print (clockmins);
hardwired.print(",");
if ( searching == HIGH ) {
hardwired.print ("searching,");
}
else {
hardwired.print ("locked,");
}
if ( queue == HIGH ) {
hardwired.print ("NORMAL,");
}
else {
hardwired.print ("EXPRESS,");
}
hardwired.print (number);
hardwired.print(",");
hardwired.print ("PRINTING");
hardwired.println(",");
Serial.print (number);
Serial.print(",");
Serial.print ("PRINTING");
Serial.println(",");
hardwired.print (char () clockyear);
hardwired.print(",");
hardwired.print(clockmonth);
hardwired.print(",");
hardwired.print(clockday);
hardwired.print(",");
hardwired.print (clockhours);
hardwired.print(",");
hardwired.print (clockmins);
hardwired.print(",");
if ( searching == HIGH ) {
hardwired.print ("searching,");
}
else {
hardwired.print ("locked,");
}
if ( queue == HIGH ) {
hardwired.print ("NORMAL,");
}
else {
hardwired.print ("EXPRESS,");
}
hardwired.print (number);
hardwired.print(",");
hardwired.print ("PRINTING");
hardwired.println(",");