mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 06:39:05 +00:00
manual
This commit is contained in:
@@ -8,14 +8,17 @@ Configuration Variables
|
||||
|
||||
uint8_t transmitter_mac[ESP_NOW_ETH_ALEN] = {0x9C, 0x9E, 0x6E, 0x14, 0xB5, 0x54};
|
||||
|
||||
Receiving Data
|
||||
--------------
|
||||
Receiving & De-Ecapsulating Data
|
||||
--------------------------------
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
void onDataReceived (const uint8_t *mac_addr, const uint8_t *data, uint8_t data_len) {
|
||||
ESP_LOGI(TAG, "Data received from: %02x:%02x:%02x:%02x:%02x:%02x, len=%d", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5], data_len);
|
||||
memcpy(&buf, data, sizeof(buf));
|
||||
|
||||
x_axis = buf.x_axis;
|
||||
y_axis = buf.y_axis
|
||||
}
|
||||
|
||||
Main Function
|
||||
|
Reference in New Issue
Block a user