I wounder what is the format of the serial data stream that usually is sent from computer to arduino through serial connection . my project use serial connection with arduino to send data from python(pyserial) to arduino , and when I send a string and I try to print it on LCD it appears but the first character changes to a chinese or japanese character .
so can any body explane the steam format to understand what is the wrong or what happens .
this is the arduino code and python code I used : arduino :
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
lcd.print("hello, world!");
Serial.begin(9600);
}
void loop() {
lcd.setCursor(5, 1);
char rd[5] ;
Serial.readBytesUntil('.', rd, 5);
Serial.flush();
Serial.println();
lcd.print(rd);
}
python
import serial
s = serial.Serial('/dev/ttyACM0',buadrate = 9600)
s.write('est.')
update I found through serial monitor that the text is recived correctly but next loop it gives © as a value of rd .