vishnu046 wrote:Hi rudy,
OS_SPRINTF doesnt supprot %f ...
i am using like this...
hi vishnu

thank you so much for your effort and help.
i will test asap

i search in
http://www.cs.fsu.edu/~baker/devices/lx ... t/printf.cfor making a function .. without boot.h ..
so you have save me the work
thank you!!
^^^^^^^^^^
best wishes rudi

btw: i help me in past like this way, this is a simple way in first step to get decimals..
Code: Select all
char temp[100];
char arraystring[5];
float adjustvalue = 1.5; // my LM35 was difference 1.5 kelvin to the mechanical thermometer to much .. so i substrakt this from measuring value later..
float adc_value;
int decimal, whole;
...
...
adc_value = adc_read();
adc_value = ((adc_value * 1000 / 1024 / 9.31 ) - adjustvalue );
whole = adc_value;
decimal = ( adc_value - whole ) * 10 ; // only deci ..
..
..
os_sprintf(arraystr, "%2d.%i", whole, decimal ); // look like 17.5
os_sprintf(temp,"Temp measuring was: %s °C", arraystr);
uart0_sendStr(temp);
..
or simple without the arraystr..
Code: Select all
os_sprintf(temp,"Temp measuring was: %2d.%i °C", whole, decimal);
uart0_sendStr(temp);
btw with esp-01 the adc measuring will be fine too, i attached the mod at a esp-01
add a LM35 to the adc pin and get the measuring too

i love espressif!!!
^^^^^
rudi

info for negative celsius..
my measuring is allways in + Celsius so i can work this in paste way.. but
if measuring value goes - Celsius, the formated value is
so must change the negative decimal .. i will test yours

thank you!!!
edit'S: misspelling ..name