-
1. Re: UART comunication PSOC 5LP
AnkitaS_51Jun 7, 2017 11:13 PM (in response to user_1944561)
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
-
2. Re: UART comunication PSOC 5LP
user_1944561 Jun 9, 2017 4:34 PM (in response to user_1944561)sorry ...
Try this link https://www.itead.cc/wiki/Nextion_HMI_Solution -
3. Re: UART comunication PSOC 5LP
AnkitaS_51Jun 11, 2017 11:22 PM (in response to user_1944561)
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/
-
4. Re: UART comunication PSOC 5LP
user_1944561 Jun 13, 2017 8:34 AM (in response to user_1944561)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 thisSerial.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... -
5. Re: UART comunication PSOC 5LP
AnkitaS_51Jun 15, 2017 10:21 PM (in response to user_1944561)
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
-
6. Re: UART comunication PSOC 5LP
user_1944561 Jun 16, 2017 5:16 AM (in response to user_1944561)thank you friend ANKS
-
7. Re: UART comunication PSOC 5LP
user_1944561 Aug 20, 2017 7:46 PM (in response to user_1944561)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
-
-
9. Re: UART comunication PSOC 5LP
user_1944561 Aug 21, 2017 8:37 PM (in response to AnkitaS_51)1 of 1 people found this helpfulThe 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
-
10. Re: UART comunication PSOC 5LP
AnkitaS_51Aug 29, 2017 9:46 PM (in response to user_1944561)
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.
-
11. Re: UART comunication PSOC 5LP
user_1944561 Aug 30, 2017 3:00 PM (in response to AnkitaS_51)Already make the changes and is working very well.... thank you very much for your help