Skip to content

Commit

Permalink
Fix for platform IO vs arduino lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Johboh committed Aug 11, 2024
1 parent 5685347 commit b91df03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/arduino/sleeping_node/sleeping_node.ino
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@ EspNowNode::OnStatus _on_status = [](EspNowNode::Status status) {

EspNowPreferences _esp_now_preferences;
EspNowCrypt _esp_now_crypt(esp_now_encryption_key, esp_now_encryption_secret);
#ifdef PLATFORMIO // Uses arduino_esp_crt_bundle_attach
EspNowNode _esp_now_node(_esp_now_crypt, _esp_now_preferences, FIRMWARE_VERSION, _on_status, _on_log,
arduino_esp_crt_bundle_attach);
#else // uses esp_crt_bundle_attach
EspNowNode _esp_now_node(_esp_now_crypt, _esp_now_preferences, FIRMWARE_VERSION, _on_status, _on_log,
esp_crt_bundle_attach);
#endif

void setup() {
Serial.begin(115200);
Expand Down

0 comments on commit b91df03

Please sign in to comment.