CyberpPi - What's the Structure of Message for LAN Broadcast (ESP NOW)


#1

Hi, I’d like to communicate an ESP-32 with a CyberPI.

It says in the documentation that the Cyperpi’s LAN Broadcast is managed with ESP-NOW:

“LAN commnunication between CyberPis is implemented based on the ESP-NOW protocol pf ESP32”
(https://education.makeblock.com/help/faqs-on-product-specifications/)

But ESP-NOW requires the message structure to be able to send a message to the Cyberpi.

My question is: what is the ESP NOW message structure for Cyberpi?

Because I don’t think it’s a good one:

typedef struct struct_message {
char a[32];
int b;
float c;
string d;
bool e;
} struct_message;

Yours faithfully
Illyes


#2

You could try something like this:

typedef struct {
    char text[32];      // Replace 'string' with a character array
    int sensorValue;    // Example: Integer field for sensor readings
    float temperature;  // Example: Floating-point field for temperature
    bool flag;          // Example: Boolean field for status
} esp_now_message;

But to be honest, I’m a web dev and backend guy; I don’t know much about this type of stuff.
Perhaps you can ask makeblock support via email (support@makeblock.com).

Good luck!
@Illyes


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.