Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

uart_communication_main.cpp 460B

12345678910111213141516171819
  1. #include "uart_communication.h"
  2. int main(void) {
  3. printf("Starting the loopback application...\r\n");
  4. LFR_UART uartCommunicator;
  5. uartCommunicator.sendTelegram(-1.0, -0.99, 0.99, 1.0);
  6. double buffer[4] = {0.0, 0.0, 0.0, 0.0};
  7. sleep(1);
  8. if(uartCommunicator.readTelegram(buffer)){
  9. for(int i = 0; i < 4; i++) {
  10. std::cout << buffer[i] << " ";
  11. }
  12. }
  13. else {
  14. std::cout<<"ne";
  15. }
  16. return 0;
  17. }