Start a new topic

NEXTION and ARDUINO DUE - SERIAL COMM problem

Hello


I am using nextion touch 5'' and now I am trying to connect to arduino due via SERIAL1 SERIAL2 SERIAL3 because SERIAL is already occupied.


I tryied everything but no way to get it working.


I read that arduino due additional serials are 3.3V TTL, will this affect the nextion display? 


Thank you in advance for help.


Filipe


The MCU on the back of the Nextion is a 3.3V chip (STM32F030C8T6 powered after the 3.3V regulator) that can tolerate 5V on some of the pins (rx/tx).  However, I don't believe there should be any issue as long as ground is common and the Nextion itself is powered by proper 5V needed for the TFT screen.

Hi Patrick,


thanks for the answer. 


I am using a 5V 1A power supply to power the touch screen and also common grounds.


I tested with SERIAL0 and I am getting this: e ÿÿÿ everytime I press a button on the touch screen and I see the RX led on the due turning ON, and if I change to the serial 1 I get nothing and the RX not even blinks.


I am using this code to test: 

#include <Nextion.h>

Nextion myNextion(Serial1, 9600); //TOUCH A ---> TX to pin 18 and RX to pin 19

char rx_message_A[25];
char rx_message_B[25];

void setup() {

  Serial.begin(9600); 
  delay(100);
  Serial1.begin(9600);   //TOUCH A
  delay(100);
  myNextion.init();

}

void loop() {

  myNextion.listen().toCharArray(rx_message_A, 25);

 Serial.print(rx_message_A);

}

 Any other help would be great.

BTW I am using the Programming port and not the NATIVE PORT of the Due

Apparently the Arduino DUE does not like this code line:

 

Nextion myNextion(Serial3, 9600); //TOUCH A ---> TX to pin 18 and RX to pin 19

Any ideas why? is works pretty fine with 2 touch screens on Mega.



Any ideas?


Patrick have you ever tried to work with NEXTION display and DUE?

I haven't played with Arduino ... I am more bare metals with Intel and ST chips and soon to try ESP8285.


If it were me, I would look at the chip in the middle, download the datasheet, find out which pins are for uart trace those pins out to the edge so I know which to use.  Specs, datasheets and schematics.


I do know that the DUE and the Mega are not the same MCU - and that will mean there will be differences between the two.

The myNextion Library did not work at my project es well.


I decided to switch over to https://github.com/itead/ITEADLIB_Arduino_Nextion


This one works, after changing Line 17 (#include <SoftwareSerial.h>) in file "NexUpload.cpp"

I am trying to use nextupload with arduino due, it gives erros as it requires compatible sd library, did any have any success compiling it without errors, 

Login or Signup to post a comment