7 years, 8 months ago.

temperature ?

how can I change the temperature readout from C to F for the hexiwear device?

Question relating to:

Hexiwear team to share code, project ideas, trick and tips

1 Answer

7 years, 8 months ago.

Hi Tj,

So currently the hexiwear outputs temperature in C.

An easy way to modify this would be in main.cpp

Simply knowing that:

T(°F) = T(°C) × 1.8 + 32

Take the readout in temperature of 'sensor_data[1]' and apply to it to the formulae above.

A more failsafe approach would be to edit the object 'getTemperature' in the MPL3115A2.cpp to do the above formulae.

If you need anything else, let me know :)

Regards,

Andrea team mbed