WiFi kit8 serial TX/RX and pins Definitions Help

Good Day all!
Happy New Years!!
Ok, I’m trying to communicate to a serial sensor via TX and RX. I can send a query to the sensor, I can see on the sensor Led display it’s received a request. I can see the sensor send the response, but the WiFi kit8 never receives it.
Do I have to define the Pins for TX and RX on the WiFi Kit8 ?
If so, can a Understandable Sample be shown?
I’m defining “mdDeRe D7” as output, is this the correct way?
I don’t see pin D7 turn LOW at all.
Maybe this is the reason we are not getting RX data.

This is what I’m sending:

#define mdDeRe D7 // D7/GPIO13 sends signal to Sensor to receive or send Data.
int incomingByte[13] ; //array of data
#include <U8g2lib.h>
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=/ 16, / clock=/ 5, / data=*/ 4);

void setup() {
pinMode (mdDeRe,OUTPUT);
Serial.begin(9600);
u8g2.begin();
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB12_tr);
u8g2.drawStr(25,15,“Loading…”);
u8g2.sendBuffer(); // transfer internal memory to the display
delay(3000);

void loop() {
digitalWrite(mdDeRe, HIGH);
Serial.write(17);
Serial.write(3);
Serial.write(0);
Serial.write(84);
Serial.write(0);
Serial.write(4);
Serial.write(7);
Serial.write(73);
Serial.flush();
digitalWrite(mdDeRe,LOW);

if (Serial.available()) {
for (int i=0; i<13; i ++){
incomingByte[i] = Serial.read();
}
}
int Temp = incomingByte[4];
u8g2.clearBuffer(); // clear the internal memory
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.drawStr(10,8,"Sensor GTemp is: ");
u8g2.drawStr(35,19,Temp);
u8g2.sendBuffer(); // transfer internal memory to the display
delay(1000);

 while(Serial.available() >0){
byte dump = Serial.read();
}

hi,

I think there is no problem with D7 output. i have test one example and get my want.
%E5%9B%BE%E7%89%87

And I test your code, i can’t get the rigt result.

Humm.
I will try to use same way as you did to pull low the pin D7.

Anything for serial Sample?
How to define the TX and RX pins ?

Your help is very appreciated !

hi,

I think it may be the reason for the baud rate setting. The baud rate of the bootloader of the ESP8266 chip is 76800

%E5%9B%BE%E7%89%87

Thank you so much for your time!
I have tried and verified the output pin sample and works!
But I still have issues with RX.
You mention the baud Rate on the bootloader is different to what it was set up using Serial.begin(9600). <— this would not put it to the baud rate the sensor works under?
If not how can it be done?