From 5a0869d07ec4506d746db15926e219993be43f8f Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Sat, 5 Jul 2025 00:30:23 -0400 Subject: [PATCH] receiver --- ESP32-IDF_ESPNOW-Receiver/main/sensors_data.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ESP32-IDF_ESPNOW-Receiver/main/sensors_data.h diff --git a/ESP32-IDF_ESPNOW-Receiver/main/sensors_data.h b/ESP32-IDF_ESPNOW-Receiver/main/sensors_data.h new file mode 100644 index 000000000..db71cd71b --- /dev/null +++ b/ESP32-IDF_ESPNOW-Receiver/main/sensors_data.h @@ -0,0 +1,20 @@ +#ifndef SENSORS_DATA_H +#define SENSORS_DATA_H + +#include +#include +#include + +typedef struct { + uint16_t crc; // CRC16 value of ESPNOW data + int x_axis; // Joystick x-position + int y_axis; // Joystick y-position + bool nav_bttn; // Joystick push button + bool led; // LED ON/OFF state + uint8_t motor1_rpm_pwm; // PWMs for 4 DC motors + uint8_t motor2_rpm_pwm; + uint8_t motor3_rpm_pwm; + uint8_t motor4_rpm_pwm; +} __attribute__((packed)) sensors_data_t; + +#endif \ No newline at end of file