im sending via uart data from stm32 like this:
sprintf(buffer, "%d %d %d %d %d %d %d %d %d %d %d %f;", (int32_t)ir_average, (int32_t)red_average, (int32_t)dcFilterIRresult, (int32_t)dcFilterRedresult, (int32_t)chebyshevResult2, (int32_t)elipticResult2, (int32_t)wyjscie, (int32_t)bpm_up, (int32_t)fftbmp, (int32_t)currentSaO2Value, (int32_t)spo2Calib, temp);
HAL_UART_Transmit(&huart4, buffer, 100, 1000);
how should i read it from esp8266 side in arduino ide? maybe i should do it differently? i wanted to send a packet od data and split it after reading full packet on esp8266
To read bytes from the UART in arduino IDE: Serial.read() (in a loop) or Serial.ReadString().
Generally speaking, prefer using snprintf to sprintf to avoid buffer overflows.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.