Skip to main content
added 4 characters in body
Source Link

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference:
Serial.write() 
https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference:
Serial.write() https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference:
Serial.write() 
https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }
added 4 characters in body
Source Link

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference: 
Serial.write() https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference: Serial.write() https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference: 
Serial.write() https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }
Source Link

i think you should change Serial.write() to Serial.print() because Serial.write() is for send data as bytes or series of bytes and Serial.print() send as human-readable text.
Reference: Serial.write() https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
Serial.print()
https://www.arduino.cc/reference/en/language/functions/communication/serial/print/
esp 8266 code:

void setup()
{
 Serial.begin(9600);
}
void loop(){
    Serial.print("hello friend");
    delay(2000);
 
 }