mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 01:32:05 +00:00
ESP-NOW-Transmitter
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#define ESPNOW_MAXDELAY 512
|
||||
|
||||
static const char *TAG = "ESP-NOW_Transmitter";
|
||||
static sensors_data_t buffer;
|
||||
|
||||
static QueueHandle_t s_example_espnow_queue = NULL;
|
||||
|
||||
@@ -422,7 +423,7 @@ void sendData (void) {
|
||||
//ESP_LOGI(TAG, "pcm 3, pcm 4 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor3_rpm_pcm, (uint8_t)buffer.motor4_rpm_pcm);
|
||||
|
||||
// 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));
|
||||
uint8_t result = esp_now_send(receiver_mac, &buffer, sizeof(buffer));
|
||||
|
||||
// If status is NOT OK, display error message and error code (in hexadecimal).
|
||||
if (result != 0) {
|
||||
|
Reference in New Issue
Block a user