mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 12:30:52 +00:00
ESP-NOW Transmitter
This commit is contained in:
@@ -87,8 +87,8 @@ void sendData (void)
|
||||
|
||||
// Display brief summary of data being sent.
|
||||
ESP_LOGI(JTAG, "Joystick (x,y) position ( %d, %d )", buffer.x_axis, buffer.y_axis);
|
||||
ESP_LOGI(JTAG, "pwm 1, pwm 2 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor1_rpm_pcm, (uint8_t)buffer.motor2_rpm_pcm);
|
||||
ESP_LOGI(JTAG, "pwm 3, pwm 4 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor3_rpm_pcm, (uint8_t)buffer.motor4_rpm_pcm);
|
||||
ESP_LOGI(JTAG, "pwm 1, pwm 2 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor1_rpm_pwm, (uint8_t)buffer.motor2_rpm_pwm);
|
||||
ESP_LOGI(JTAG, "pwm 3, pwm 4 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor3_rpm_pwm, (uint8_t)buffer.motor4_rpm_pwm);
|
||||
|
||||
// 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((uint8_t*)receiver_mac, (uint8_t *)&buffer, sizeof(buffer));
|
||||
|
Reference in New Issue
Block a user