String to HEXString


ho un problema, non riesco a effettuare la conversione di una varaibile String in un una Hex String.
Avete qualche function da consigliarmi?
Premetto che è una procedura che devo obbligatoriamente fare per un progetto IoT per inviare i dati.


You should post your problem in English, so everyone can understand and help you :slight_smile:


I have a problem, I can not convert a string into a hexadecimal string.
Do you have any function to advise me?
I need format of the String to send it.


Can you also post your code (using code tags, please)?

 if ( delta_lora_tx > timer_period_to_tx) {
    Serial.println("TX DATA");
    // Transmit Data - as HEX String
    // get RSSI and SNR of last received packet
    Serial.println("RSSI: "+RSSI);
    _snr = SNR.toInt();
    Serial.print("SNR: ");

     timer_millis_lora_tx = millis();

A string and a String are different things. The terms are not interchangeable. A string is a null terminated character array. A String is an instance of an object of the String class. Which one do you need to output?

Note that Strings, if not used with care, can cause memory corruption in the small memory space of an Arduino.
The evils of Strings.