From cce8f23e86bc8268ba32ae1312aaa194d3f64acb Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Sat, 4 Jan 2025 05:34:33 -0500 Subject: [PATCH] ESP32-C3 RC & Receiver --- ESP-IDF_Robot_RC/main/espnow_example_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ESP-IDF_Robot_RC/main/espnow_example_main.c b/ESP-IDF_Robot_RC/main/espnow_example_main.c index ae4da192c..68b8386c9 100755 --- a/ESP-IDF_Robot_RC/main/espnow_example_main.c +++ b/ESP-IDF_Robot_RC/main/espnow_example_main.c @@ -100,9 +100,10 @@ void sendData (void) { ESP_LOGI(TAG, "pcm 1, pcm 2 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor1_rpm_pcm, (uint8_t)buffer.motor2_rpm_pcm); ESP_LOGI(TAG, "pcm 3, pcm 4 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor3_rpm_pcm, (uint8_t)buffer.motor4_rpm_pcm); - //uint8_t result = esp_now_send(receiver_mac, &flagToSend, sizeof(flagToSend)); + // Call ESP-NOW function to send data (MAC address of receiver, pointer to the memory holding data & data length) uint8_t result = esp_now_send(receiver_mac, &buffer, sizeof(buffer)); + // If status is NOT OK if (result != 0) { ESP_LOGE("ESP-NOW", "Error sending data! Error code: 0x%04X", result); deletePeer();