Me TFT LCD and Makeblock Orion


#1

Hello.How can i write on Me TFT LCD screen a variable(like integer), in exemple routine there is only string example.
Thank.


#2

Hi,

It looks like the TFT LCD modue listens on the serial port for command strings. You should be able to send the command string in parts to the display.

Based on the MakeBlock example:
Serial.println(“DS64(80,30,‘2015-05-20’,1);”);// display 2015-05-20 with 64 dot matrix at the position of coordinate (80, 30)

I think something like this should work:

int Year = 2015;
Serial.print (“DS64(80,30,’”);
Serial.print (Year);
Serial.println("-05-20’,1);");

The Year variable holds the number. Note that only the last print statement ends with ‘ln’ to terminate the command.

I don’t own the MakeBlock TFT LCD module, so I can’t verify if it works. So please share the result.

Joep


#3

Hello
Thank you for you answer.
It work very well. Thank you a lot.
bye.


#4

Thanks Joe, works great.
MeUltrasonicSensor ultrasonic_3(3);
MeSerial se;
MePort soundsensor_7(7);
MeTemperature temperature_6_1(6,1);
MePort lightsensor_8(8);

void setup()
{
Serial.begin(9600);

}
void loop()
{
Serial.print(“CLS(0);”);
Serial.print(“DR0;”);
Serial.print(“DS32(30,10,’”);
Serial.print(String(“Dist: “)+ultrasonic_3.distanceCm());
Serial.print(”’,1);”);
Serial.print(“DS32(30,50,’”);
Serial.print(String(“Sound: “)+soundsensor_7.aRead2());
Serial.print(”’,1);”);
Serial.print(“DS32(30,90,’”);
Serial.print(String(“Light: “)+lightsensor_8.aRead2());
Serial.print(”’,1);”);
Serial.print(“DS32(30,130,’”);
Serial.print(String(“Temp: “)+temperature_6_1.temperature());
Serial.println(”’,1);”);
delay(3000);
}


#5