#include "esp_err.h"
#include "general/node_cfg.h"
Go to the source code of this file.
◆ register_slave()
Send the registration packet to the master via ESP-NOW.
- Parameters
-
| slave | Pointer to slave_data with name, lat, lon, etc. |
- Returns
- ESP_OK on success, error code otherwise
◆ send_sensor_data()
Send sensor data (measurement) to the master via ESP-NOW.
- Parameters
-
| slave | Pointer to slave_data with moisture, battery, etc. |
- Returns
- ESP_OK on success, error code otherwise
◆ send_theft_alarm()
Send theft/tampering alarm to the master via ESP-NOW.
- Parameters
-
| slave | Pointer to slave_data for the node that triggered the alarm |
- Returns
- ESP_OK on success, error code otherwise
◆ slave_com_init()
| int slave_com_init |
( |
void |
| ) |
|
Initialize slave communication (queue, ESP-NOW, broadcast peer)
Call once at slave startup before sending any messages.
- Returns
- ESP_OK on success, error code otherwise