Send a String with ESP-Now
Posted: Thu Mar 18, 2021 6:14 pm
Hi,
As a (former) Pascal user I have trouble with all those different string and char types in Arduino. For string manipulation I the String type since it reminds me most of Pascal strings . But in using ESP-Now I have to use the uint8_f type, ESP-Now uses that type for the esp_now_send and esp_now_receive functions, How do I send and receive a String (with a capitol S) with ESP-Now? Or in different words: how do I convert a String to uint8_t before sending and how do I convert it back to String after receiving?
Since the ESP8266 in this case goes into deep sleep (and thus restarts when waking up) after each message there will be no memory issues using String.
Peter
As a (former) Pascal user I have trouble with all those different string and char types in Arduino. For string manipulation I the String type since it reminds me most of Pascal strings . But in using ESP-Now I have to use the uint8_f type, ESP-Now uses that type for the esp_now_send and esp_now_receive functions, How do I send and receive a String (with a capitol S) with ESP-Now? Or in different words: how do I convert a String to uint8_t before sending and how do I convert it back to String after receiving?
Since the ESP8266 in this case goes into deep sleep (and thus restarts when waking up) after each message there will be no memory issues using String.
Peter