5 Replies Latest reply on Sep 23, 2020 7:01 AM by EvPa_264126



      I want to get information from the slider on the touch nextion screen to psoc. I connected Nextion with UART to PSoC.

      For example, if the slider value is 25%, how can I transfer it to PSoC?


        • 1. Re: Nextion


          This thread has an example of working with NEXTION.

          Working with a slicer - read / write.

          I hope this helps a little.

          1 of 1 people found this helpful
          • 2. Re: Nextion

            Dear Evgeniy,

            which program is read?

            I want to read the slider (h0) percentage from the Nextion.

            How should I use which command?




            void readNum(void)


               //char Str[12]  = "";  // Строка для сборки

               sprintf(Str,"xstr 0,30,200,20,0,BLACK,WHITE,0,0,1,\x22 Data= %d  \x22\xFF\xFF\xFF",received[1]);

               NEXTION_UART_PutString(Str);   //




            void processMessage(unsigned char Length)  



              switch (received[0])


              case 0x65: { Touch_event(); break;}; // 

                  case 0x71: { readNum(); break;}; //  


                  default: {

                NEXTION_UART_PutChar(Length); // сообщаем о не поддерживаемой функции






            • 3. Re: Nextion

              This version of the program does not read the value of the slider, but only informs about pressing.

              I no longer remember the algorithm of actions ((

              It seems so:

              1.We are waiting for messages from NEXTION (CY_ISR (dataInRx_isr) flag Message sets = 2)

                 when any component is pressed, NEXTION will display a message ...

                 e.g. 6500 0400 FFFF FF

                First byte of message 0X65 Touch event return data   it will be handled by processMessage ()

                 ---> case 0x65: {Touch_event (); break;};


              further void Touch_event (void) will simply inform -> "Slider pressed"


              If your slider has the name n0, then to read the slider you need to create the command NEXTION_UART_PutString ("get n0.val \ xFF \ xFF \ xFF");}

              • 4. Re: Nextion

                Dear Evgeniy,

                So what should I do to read?

                • 5. Re: Nextion

                  YOU said the display and PSoC are connected. what board do you use?

                  Can you provide your test project?

                  The very first step is to connect to NEXTION in a convenient way and see the result of pressing the slider.

                  For example CY8CKIT-059 PSoC 5LP has a USB-> UART_TTL converter (P12.7 = Tx P12.6 = Rx) like here (message 13)