Closed
Description
//#define SERIAL SerialUSB //Zero
#define SERIAL Serial //STM32
void setup() {
SERIAL.begin(115200);
while(!SERIAL);
Serial1.begin(19200,SERIAL_8E1);
SERIAL.println("Setup ready");
}
void loop() {
SERIAL.println("Send 0xFF");
Serial1.write(0xFF);
int temp = 0;
delay(50);
while(Serial1.available()>0){
temp = Serial1.read();
SERIAL.print("Data: ");
SERIAL.println(temp,HEX);
}
delay(10000);
}
i tested this code on Arduino Zero and L476 and with a loop connection (RX shorted to TX)
Zero write 0xFF and read 0xFF
L476 write 0xFF and read 0x7F