There is a YouTube video that showcases the Expansion board.
The Nextion Instruction Set defines the io variables in #19,#20 and #21
and how to configure the gpio using the cfgpio command
When configured as digital IO is it a matter of either
reading pio0 as a 1 or 0 such as c0.val=pio0
writing 1 or 0 to pio0 such as pio0=c0.val
I have not really played with the PWM