mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-09-02 17:43:31 +00:00
ESP-NOW-Transmitter
This commit is contained in:
@@ -86,9 +86,9 @@ void sendData (void) {
|
|||||||
buffer.y_axis = y;
|
buffer.y_axis = y;
|
||||||
|
|
||||||
// Display brief summary of data being sent.
|
// Display brief summary of data being sent.
|
||||||
//ESP_LOGI(TAG, "Joystick (x,y) position ( %d, %d )", buffer.x_axis, buffer.y_axis);
|
ESP_LOGI(TAG, "Joystick (x,y) position ( %d, %d )", buffer.x_axis, buffer.y_axis);
|
||||||
//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 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);
|
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)
|
// 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, (uint8_t *)&buffer, sizeof(buffer));
|
uint8_t result = esp_now_send(receiver_mac, (uint8_t *)&buffer, sizeof(buffer));
|
||||||
|
Reference in New Issue
Block a user