TFT LCD Screen and Arduino Code [Closed]


#1

Hi,
I am trying to get my LCD screen to display a couple of values, some of which will be calculated in the code, and others that will be read in from a variety of sensors. The issue that I am having is that with the following code (for testing out the screen) the first thing that is supposed to be printed is an x value, which only displays the first iteration of the loop, then disappears. Does anyone know why this might be happening, and how to fix it?

#include "MeOrion.h"
#include <SoftwareSerial.h>

MeSerial mySerial(PORT_5);

#define MAX_STRING_LEN  128
String show_buffer = "";
char str_buffer[MAX_STRING_LEN];
int x=0;
int y=0;
int z=0;
float Pin= 0.00;
float Vin=0.00;
float Pout=0.00;
float Vout=0.00;
float Eff= 0.00;



void setup() {
// put your setup code here, to run once:
mySerial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
Printer();
}



void Printer(void)
{
Serial.print("CLS(0);"); // clear the screen with c color 
Serial.print("DR0;");    // the screen displays in upright way
//--------------------------------
Serial.print("DS32(1,1,'x: ");
Serial.print(x);
Serial.println("',15);");
Serial.print("DS32(120,0,'y: ");
Serial.print(y);
Serial.println("',15);");
Serial.print("DS32(240,0,'z: ");
Serial.print(z);
Serial.println("',15;");
Serial.print("DS32(0,60,'Pin: ");
Serial.print(Pin);
Serial.println("',15);");
Serial.print("DS32(160,60,'Vin: ");
Serial.print(Vin);
Serial.println("',15;");
Serial.print("DS32(0,100,'Pout: ");
Serial.print(Pout);
Serial.println("',15;");
Serial.print("DS32(160,100,'Vout: ");
Serial.print(Vout);
Serial.println("',15;");
Serial.print("DS64(0,140,'Efficiency: ");
Serial.print(Eff);
Serial.println("%',15;");
delay(3000);
}

@tec_support


#2

The [quote=“yousimxing, post:1, topic:8593”]
Serial.println
[/quote] only goes on the last line for which you are outputting.


#3