0

tl:dr Looking for a way to change the active page in python3 using the Nextion library, I have tried (x = 1, x = 'page1', x = 'page 1') and a many other iterations.

    client = Nextion('/dev/ttyS0', 9600, event_handler)
    await client.connect()
    await client.set('page', x)

Hi everyone, I am making a Nextion display to attach to the outside of a raspberry pi to display some operational values such as if a serial port is connected, gps location data, cpu operating temp etc.

The logic for collection and display of the data is all sorted but I am having issues with the basics of the Nextion library and how to do what seems like a simple thing, change the active page.

1 Answers1

0

Ok so I finally worked it out,

It looks like the example I used had the await client.set(x,y) for the text fields but nothing for the page, it turns out after reading the library file for 100th time I noticed a function called write_command

I tried this client.write_command(next_page)

And it worked