How can an integer or decimal variable be converted into a hex string? I can do the opposite (convert hex to int) but I can’t figure out the other way.
This is for Serial.print() hex values in an array.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at the Arduino String tutorial here. The code below was taken from that example.
There are plenty of other examples on that page, though I think for floating point numbers you’ll have to roll your own.