- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I need to know which are the statements that I use to send data to a smart screen NEXTION, I have to show three data level temperature and PH, each one has an address and I do not know where to write them to send the data correctly. The data sheet of the screen is https://www.itead.cc/wiki/Nextion_Instruction_Set.
Sorry for my English, I'm from Argentina
Greetings, I hope you can help me
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can check the UART component Datasheet(which you can get by right clicking the Component on Creator) and get details about API available.
I can't get the datasheet from the datasheet link posted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To make Nextion display display , the first thing we should do is to design an HMI file in the related software called Nextion Editor. Nextion Editor(Official Download) is a development software used for visual building of graphic interface for embedded GUI-intensive devices with various types of TFT displays .
I don't find details about Commands needed by the screen .But you can refer this Project as example which states steps to follow for a project with this Display-
http://www.instructables.com/id/Nextion-Arduino-Project-Whac-A-Mole-Crazy-Pony-Gam/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
arduino utiliza una biblioteca especifica para esta pantalla....asi que eso lo hace un poco mas fácil....
For example to send a data to the progress bar send this
Serial.print("j0.val="); //Variable of the screen to modify
Serial.print(val); //Send the optimum value of the potentiometer
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);
My doubt is, that sentence use in the psoc creator pra to send the value that corresponds to "j0.val" of the screen. Could you use this UART_PutString () statement for example? But where do I put the address "J0.val"?
Thank you friend...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
UART_PutString () can be used to print strings like Serial.print("j0.val=");.
UART_WriteTxData() sends a byte without checking for buffer room or status.
Please go through the datasheet of UART component and find the corresponding API's available to use by the component in Creator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you friend ANKS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your advice, I managed to communicate with the screen, and managed to send a text, the problem is that I can not send the numerical data correctly, perhaps because of a formatting problem I suppose. Convert the character to the voltage value that I take from a potentiometer using sprintf () and send it, but does not show it, maybe I should send them as numerical data in hex?.
There is a way to directly change a number that represents the value in volt of the state of the potentiometer to another format ... for example to hexa. I take that value in volt and conveti to character
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The value of str is a character, my question is if it is correct to send it like this.
I send it as in the following example but it does not show na on the screen.
sprintf (str,"%.4f",voltage);
uart_putstring("n0.val=");
uart_putchar(0x22);
uart_putstring(str);
uart_putchar(0xff);
uart_putchar(0xff);
uart_putchar(0xff);
I tried sending a text and it sends it of the following form without problems:
uart_putstring("t0.txt=");
uart_putchar(0x22);
uart_putstring("hola");
uart_putchar(0x22);
uart_putchar(0xff);
uart_putchar(0xff);
uart_putchar(0xff);
Also try the following:
sprintf (str,"%.4f",voltage);
uart_putstring("t0.txt=");
uart_putchar(0x22);
uart_putstring(str);
uart_putchar(0x22);
uart_putchar(0xff);
uart_putchar(0xff);
uart_putchar(0xff);
And the value displayed on the screen is 0.000, When I move the pot the value changes to -0.000, the 0.0, But never shows another value. Any proposal......thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you done the changes as suggested in the KBA's previously suggested for using SPRINTF .i.e increasing heap size and choosing nano-float library.
Please share your project with us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Already make the changes and is working very well.... thank you very much for your help