diff --git a/Code/ESP32_communication/Two-way/ESP32_slave/ESP32_slave.ino b/Code/ESP32_communication/Two-way/ESP32_slave/ESP32_slave.ino index 93104d8c3d7de0baedea367e1a445c4f1d1c0270..29542468d4c60ca99b8ca2628d8ae14eada2d99a 100644 --- a/Code/ESP32_communication/Two-way/ESP32_slave/ESP32_slave.ino +++ b/Code/ESP32_communication/Two-way/ESP32_slave/ESP32_slave.ino @@ -60,7 +60,7 @@ void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) { void setup() { // Init Serial Monitor - Serial.begin(115200); + Serial.begin(9600); // Set device as a Wi-Fi Station WiFi.mode(WIFI_STA); @@ -94,13 +94,13 @@ void setup() { void loop() { ChangeVariables(); - if(lidar_thres < 300 && seeking_speed < 50){ - receivedData.DebugM = "catch ball and seeking for goal"; + if(lidar_thres < 200 && seeking_speed < 50){ + receivedData.DebugM = "ca b se g"; send_message(); - }else if(lidar_thres < 300 && seeking_speed > 50){ + }else if(lidar_thres < 200 && seeking_speed > 50){ receivedData.DebugM = "catch ball"; send_message(); - }else if (lidar_thres > 300 && seeking_speed < 50){ + }else if (lidar_thres > 200 && seeking_speed < 50){ receivedData.DebugM = "seeking"; send_message(); }