String to HEXString

Buongiorno,

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.

Grazie.

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

Hi,

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.

Thanks

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
   
    gmxLR_TXData(datadisp);
    
    // get RSSI and SNR of last received packet
    gmxLR_getRSSI(RSSI);
    Serial.println("RSSI: "+RSSI);
    gmxLR_getSNR(SNR);
    _snr = SNR.toInt();
    Serial.print("SNR: ");
    Serial.println(_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.