Xinyuan-LilyGO / T-Display-S3

MIT License
731 stars 173 forks source link

SOLVED: What are the hardware serial pins on the T-Display and how should I reference them? #164

Closed contractorwolf closed 1 year ago

contractorwolf commented 1 year ago

I am having a little issue connecting from this board to another one over serial. I thought I could use pins 18 (rx) and 17 (tx) but I dont seem to be getting any response using Serial1 connected at 9600.

This is what I am doing (sudo code):

     Serial.begin(9600);
     Serial1.begin(9600);
     Sleep(3000);
     Serial1.println("AT");
     Sleep(3000);
     if(Serial1.avalable()>0) {
         Serial.println(Serial1.readString());
     }

but I am not getting a response, should I switch to software serial and use other pins? Anyone had any lucky with serial here?

lewisxhe commented 1 year ago

    Serial1.begin(9600, SERIAL_8N1, 18, 17);

contractorwolf commented 1 year ago

thanks @lewisxhe that got it working! That sort of info should be added to the documentation. At least put an example of using the Serial1 interface for connecting to a simple serial device into the examples maybe?

contractorwolf commented 1 year ago

SOLVED