mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-10 10:23:23 +00:00
ESP32-C3 RC & Receiver
This commit is contained in:
@@ -139,10 +139,16 @@ void app_main(void)
|
||||
wifi_init();
|
||||
esp_now_init();
|
||||
esp_now_register_recv_cb(onDataReceived);
|
||||
esp_now_register_send_cb(onDataSent);
|
||||
//esp_now_register_send_cb(onDataSent);
|
||||
|
||||
memcpy (peerInfo.peer_addr, receiver_mac, 6);
|
||||
esp_now_add_peer(&peerInfo);
|
||||
if (esp_now_is_peer_exist(receiver_mac)) {
|
||||
ESP_LOGI("ESP-NOW", "Receiver exists.");
|
||||
sendData();
|
||||
}
|
||||
else
|
||||
ESP_LOGE("ESP-NOW", "Receiver does not exists.");
|
||||
|
||||
xTaskCreate (rc_send_data_task, "RC", 2048, NULL, 15, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user