Shop OBEX P1 Docs P2 Docs Learn Events
Availablity of P2 code for Nextion Displays? — Parallax Forums

Availablity of P2 code for Nextion Displays?

@JonnyMac
I just received a Nextion display for another non-P2 project. I would like to incorporate into my next P2 projects. In another idscussion you mentioned having both P1 and P2 code.Are your P2 code/objects available somewhere? I checked OBEX but did not find them?
Thanks
TrapperBob

Comments

  • JonnyMacJonnyMac Posts: 9,800

    Here you go. This simple demo shows the specifics of the connected display, and if it sends text strings the way I do in my projects, will display them onscreen.

    I found a display that had an Escape Room timer running it it. There's not a lot of interaction, but the display does report when the user enters a bad code (shows the number of current tries) and when successful, reports locked as 0.

    Here's the output on my system.

    You'll need to set BR_HMI, TX_HMI, and RX_HMI constants for your display and connections.

  • Thanks Jon,

    I looked it over. Seems very nice as I have found all your code. I hope to start working on the P2 project in about 2 weeks when I have some free time.

    Bob

  • RaymanRayman Posts: 16,271

    Wonder if one really needs RX if just want to show things and not get feedback…

    Would be nice if just needed 1 P2 I/o pin…

  • JonnyMacJonnyMac Posts: 9,800
    edited 2026-03-31 21:24

    Wonder if one really needs RX if just want to show things and not get feedback…

    You could do that, but not with my object because it verifies that the Nextion is connected. Underneath my Nextion object is a trim serial object (jm_xfds.spin2) that can be used in transmit-only mode (set the RX pin to -1). That said, with P2 smart pins one could make a cogless object that just sends bytes and strings for display-only control. I routinely run my Nextion displays at 230400 baud, and even switch to 921600 when uploading a new TFT file. As most display strings would be short, I think a cogless display-only object would work fine.

Sign In or Register to comment.