sensor uint8 temperature_sensor_read()
Posted: Wed Dec 23, 2015 4:46 am
Hi
we have onSoC Sensor as temperature.
we have uint8 as F ( Fahrenheit ) ?
this are ~ -17 °C to 123 °C
so we can use simply code for conversion in Celsius, too?
can we calibrate the sensor or can we use simply calibrate
by add or subtract comparative measurement and the difference to the reference?
best wishes
rudi
ps:
the sensor shows actually in a loop stable value.
the value itself must be calibrate if use for ambient temperature.
factor for self-heating to be considered by measurements?
[/url]
( you can click for follow to a < 1MB video of the output and enlarge the pic )
btw:
i tested utf8 code in minicom for degree char with 0x00B0 but this shows not the right
in minicom. if you have the right conversion in this, reply/add yours please.
we have onSoC Sensor as temperature.
we have uint8 as F ( Fahrenheit ) ?
this are ~ -17 °C to 123 °C
so we can use simply code for conversion in Celsius, too?
Code: Select all
// simply code
uint8 temper;
float celsius;
temper= temperature_sensor_read();
celsius = ( temper - 32 ) / 1.8;
printf("Sensor onBoard is F: %i C: %.2f\n", temper, clesius);
by add or subtract comparative measurement and the difference to the reference?
best wishes
rudi
ps:
the sensor shows actually in a loop stable value.
the value itself must be calibrate if use for ambient temperature.
factor for self-heating to be considered by measurements?
[/url]
( you can click for follow to a < 1MB video of the output and enlarge the pic )
btw:
i tested utf8 code in minicom for degree char with 0x00B0 but this shows not the right
in minicom. if you have the right conversion in this, reply/add yours please.
Code: Select all
printf(" %cF: %i\n ", 0x00B0, temper);
printf(" %cC: %.2f\n ", 0x00B0, celsius);