It returns uint32 datatype, how to convert this into a string or char*??
It returns uint32 datatype, how to convert this into a string or char*??
Explore... Chat... Share...
ashubhatt wrote:It returns uint32 datatype, how to convert this into a string or char*??It is just a numeric value. In what form would you like it - decimal? hexadecimal? octal? Generally, one uses sprintf() to convert a numeric value to an equivalent sequence of characters but that function is "heavy" in that it contains code for formatting lots of different values (e.g. double, integer, character) in many different ways. Also, sprintf() has no buffer overrun protection so one must be careful using it. An alternate form, snprintf(), does . There are more special purpose routines that have more limited functionality and are, therefore, more lean. One example is itoa()
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]