[Solved] Problems with nextion

Has anyone else had trouble getting the nextion to communicate with the Particle.

I’ve tried hooking it up and just sending serial prints to do “n0.val=5” with the 3 0xFF’s after, and can’t get the value to change. In addition to that, I’ve attempted to hook up the particle via usb to my computer, and use the nextion debugger to simulate a display. I don’t see any traffic coming from the serial port. However if I open putty on the same serial port, It appears to be working fine.

Any assistance would be greatly appreciated, I can’t seem to find any answers on google, or on here.

Thanks.

Hi,

can you provide us some further information?
What Particle board are you using? What serial interface are you using on the Particle?

regards

Have you tried this library?

It’s not supporting some of the more recent controls and commands or any of the enhanced features (yet), but the basics should work.

BTW, you need to use Serial1 on a Photon.

1 Like

Thanks for the Serial 1 info, I had no idea about that.

I did switch to serial1, I am using the rx/tx pins on a photon.

Still not working, but now that I know I’m using the right pins, I have a new round of things to play with again. I’ll let you know how it turns out.

Heres my code incase someone sees an error with that, or has any other ideas

int counter=0;


void setup() {
  Serial1.begin(9600);
}

void loop() {
  counter++;
  Serial1.print("n0.val=");
  Serial1.print(counter);
  Serial1.write(0xff);
  Serial1.write(0xff);
  Serial1.write(0xff);
  
  delay(1500);
  

}

I’ll spin up one of my displays some time this weekend :wink:

Thank you for the help, the Serial1 vs Serial issue was the only real issue I was having… I played around with it a bit more, with no luck. Finally I just decided to try a different photon, and swapping out the photon solved my problem. apparently mine has a bad pin on Serial1.

Thank you very much for the help

2 Likes

Thanks for the help @ScruffR!