Go Down

Topic: UTFT,ILI9486 LCD 3,5" ¿WTF?¡¡¡ (Read 244 times) previous topic - next topic

estebangmn

Aug 23, 2019, 09:35 pm Last Edit: Aug 25, 2019, 11:30 am by estebangmn
hello homies i have a horrible problem that i dont know how to resolve,

The data that i ask to see on the TFT coming for the serial USB scroll on the screen with another amount of data that i didnt ask for,
an example:i ask for the name of the cpu like this

 myGLCD.print('cpuName',60,0);

then i see all the data coming for the hardware monitor usb like the name of the gpu,temps and all that info that i didnt ask for¡and also scrolling on the screen¡¡

i use the UTFT library,arduino UNO board and the TFT ILI9846


the only data that scroll is the data that comes from the PC stats hardware monitor 1.1,the data printed using

myGLCD.Print("CPU",0,0)

its respresented well and dont scroll


i can see the first data on the screen bu for some strange reason the data that i obtain don't stop of scrolling on the TFT constantly and i dont know how to stop it,you will see errors on the sketch for sure


youtube video

https://youtu.be/a30X_O8Zrp0

and my disturbing sketch

Code: [Select]


#include <Wire.h>
#include <SPI.h>
#include <UTFT.h>

String cpuName = "";
String inputString = "";
boolean NewData = false;
extern uint8_t BigFont[];
UTFT myGLCD(ILI9486,A5,A4,A3,A2);

void setup(){
Serial.begin(9600);
inputString.reserve(600);

myGLCD.InitLCD();
myGLCD.setFont(BigFont);  
myGLCD.setBrightness(16);
myGLCD.setContrast(64);
myGLCD.fillScr(VGA_BLACK);

 
}
void loop(){

 
if (NewData){    
NewData = false;

 myGLCD.print("CPU",0,0);
 myGLCD.print('cpuName',60,0);

 myGLCD.print("FRQ",0,30);
 myGLCD.print('frq',60,30);

 myGLCD.print("GPU",0,60);
 myGLCD.print('gpuName',60,60);

 myGLCD.print("Memory Usage :",0,90);
 
 myGLCD.print("SYSRAM",0,120);


}}

int b[8];// b #0

void serialEvent() {

 while (Serial.available()) {          //  32u4 USB Serial Available?
   char inChar = (char)Serial.read();  // Read 32u4 USB Serial
   //Serial.print(inChar); // !!!!Debug Incoming Serial, if this is left running a buffer overflow will occur!!!!

   inputString += inChar;
   if (inChar == '|') {

NewData = true;
}}}


david_prentice

Instead of "bumping" your thread,   read the Forum instructions.

Format your code nicely e.g. with ctrl-T
Select or Paste it in a Code Window e.g. with </> icon

Please edit your post.    You will get replies to a well presented message.

David.

estebangmn

#2
Aug 25, 2019, 11:03 am Last Edit: Aug 25, 2019, 11:07 am by estebangmn
really i dont know what are you talking about,i didnt saw messages in this forum with that of symbols david,you mean have to put this at the begining and at the end of the code?

</>

david_prentice

#3
Aug 25, 2019, 11:13 am Last Edit: Aug 25, 2019, 11:14 am by david_prentice
The Forum instructions are found How to use this forum - please read
It is a sticky message at the top of the user messages.

David.

estebangmn


david_prentice

#5
Aug 25, 2019, 01:00 pm Last Edit: Aug 25, 2019, 01:02 pm by david_prentice
Thanks for the Code Window.    You did not format the code.

Anyway,   I attempted to build your sketch.
Code: [Select]

C:\Users\David Prentice\Documents\Arduino\Misc_sketches\estebangmn_utft\estebangmn_utft.ino:34:22: warning: character constant too long for its type

         myGLCD.print('cpuName', 60, 0);

                      ^
...
C:\Users\David Prentice\Documents\Arduino\Misc_sketches\estebangmn_utft\estebangmn_utft.ino:34:38: warning: invalid conversion from 'int' to 'char*' [-fpermissive]

         myGLCD.print('cpuName', 60, 0);

                                      ^
...


This should be an ERROR and not a WARNING.

What display are you using?
UTFT only supports 16-bit ILI9486.    A Uno does not have enough pins for a 16-bit display.

What data do you expect to receive from the Serial Terminal?
inputString will just grow longer and longer.   Eventually it will corrupt the stack on a Uno.
You should set it back to "" when you have finished using it.

I don't see how or where inputString is ever used.  

David.

estebangmn

#6
Aug 25, 2019, 01:24 pm Last Edit: Aug 25, 2019, 01:34 pm by estebangmn
hi david again and thanks for the answer,you can see in the youtube video what i see actually in the screen,i just see all the amount data coming from hardware monitor 1.1,the problem is that i see an amount of data together in one single line scrolling and i want just some of the data not all of them together

as far as i know UNO has support to the 16bit screen,in fact i can see perfect the sketch of example on the UTFT library,

i made a new video running the code,the line scrolling represent the code

https://www.youtube.com/watch?v=eqzcf9iTbfg

Code: [Select]
myGLCD.print('cpuName',60,0);


this line should print only my cpu name but it print the whole data coming from hardware monitor 1.1 like the gpu name,the gpu load,the memory ram,every stat of the pc together on the same line

this is the tft

https://www.e-ika.com/pantalla-tft-35-de-320x480-para-arduino-mega

and this is the setup for this TFT on UNO "caputura (13) image"

as i said david the UTFT example works perfect and also when i print something like text or images works perfect but the problem comes when i try to print something coming from the serial hardware monitor 1.1

david you wrote:I don't see how or where inputString is ever used.   

its about that david,probably the code has mistakes that why i ask the people here

What data do you expect to receive from the Serial Terminal?

i expect only for what i ask and not the whole data coming and in one single line scrolling infinitely

if i ask for 'cpuName' i want only the name of the cpu to print it then of the CPU:,simple is that

estebangmn

Fixed Guys.i just had to add the strings myGLhx fCD.print(cpuName) to get for example the name of the cpu

easy but unknow for me until today

bye¡¡ and thx for nothing community of arduino fuckers¡¡

Go Up